Access 97 Problem

  • Thread starter Thread starter Kevin Wells
  • Start date Start date
K

Kevin Wells

I am running Access 97. My application uses a local Access
frontend application with an access database on a network
drive. I have seen this problem several times with
different tables in the database. My forms are not tied
directly to the underlying tables, instead I use a
querydef to insert data after it has been validated. If
the table is empty, 0 records, The first time I attempt to
insert a record, the append query I use will not work. If
I attempt to run the same query from the query builder, I
get a message that 0 rows will be inserted. If I insert
one row, even garbage data, manually, the query works just
fine.

Any ideas?
 
dim sqlStr as string
dim qdf as querydef

sqlStr="SQL String here"
set qdf.createquerydef("",sqlStr)
qdf.execute
 
The statement

set qdf.createquerydef("",sqlStr)

looks incorrect, probably only on the post.

Better to copy the code from the database and paste on to the post so that
we can see the *actual* code you used rather than the one you think you
used.
 
Post details of your relevant Tables and the code section that includes the
SQL construction and the resultant SQL String.

I am sure the problem is in the SQL String, not the code as you repeated the
problem in the QBE grid.
 
Back
Top