VBA syntax

chamill
07-11-2001, 05:17 AM
I am trying to kick off a report through VBA using a where clause which I can get to work for a numeric but I can't seem to get it to work for a literal.

Below is the syntax I am using for a numeric could anyone please tell me what I have to change for it to work with a literal ie "Marsh"

DoCmd.OpenReport stDocName, acPreview, , "[qryNotificationsByBroker]![BrokerAddressID] = 112"

I would be grateful for any help

Thanks

Conor M Hamill

Bigpapou
07-11-2001, 06:51 AM
Hi,

I'm almost sure that your problem is with the quote cause the syntax of the rest of your sentence seem fine... here's something that might help:

Since 112 is a NUMBER you don't need any quotes,
a VARIABLE needs to be seperated by an "&" and
a TEXT need to be sorrunded by single quotes.
Since your TEXT is already in a TEXT, try to double quote...

Hope this help
Bigpapou

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum