Access 97 Problem

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?
 
K

KW

dim sqlStr as string
dim qdf as querydef

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

Van T. Dinh

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.
 
V

Van T. Dinh

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top