Monday, March 19, 2012

A syntex problem.....I think

Have a SQL paramater query running in VBA. Fails on the line that requests information. The problem is the brackets [] that are used to input data to make the query operate between certain limits. I used Between [enter x] and [enter y] which does not work in VBA. If I use Between #01/01/2004# and #07/30/2004# it works with the fixed data. The query works just fine in the normal Access 2000 gui but not in VBA.
Can anybody help with this problem. I have looked high and low but find everything else but what to do with the brackets in a SQL VBA application.
Thanks,
DonThe use of brackets in a query is an MS-Access specific feature... VBA doesn't directly support that functionality. You will have to code the parameter entry screen and build the query in VBA.

-PatP

No comments:

Post a Comment