J
JMB
I'm running into problems with an append query in Access
2000 VBA. If I use the LIKE operator the query returns no
results if executed through VBA, however the identical
query runs just fine in QBE. The code looks like this:
strSQL = "INSERT INTO table ( LastName ) SELECT LastName
FROM SomeTable WHERE (((LastName) LIKE '" & somevalue
& "*'));"
Application.CurrentProject.Connection.Execute strSQL
The code returns no value. However if I print strSQL to
the immediate window and then paste it in using the create
query in SQL view and run it it works.
The table I'm appending to has no required fields and all
text fields are set to allow zero length fields and there
are no keys set.
What am I missing here?
2000 VBA. If I use the LIKE operator the query returns no
results if executed through VBA, however the identical
query runs just fine in QBE. The code looks like this:
strSQL = "INSERT INTO table ( LastName ) SELECT LastName
FROM SomeTable WHERE (((LastName) LIKE '" & somevalue
& "*'));"
Application.CurrentProject.Connection.Execute strSQL
The code returns no value. However if I print strSQL to
the immediate window and then paste it in using the create
query in SQL view and run it it works.
The table I'm appending to has no required fields and all
text fields are set to allow zero length fields and there
are no keys set.
What am I missing here?