Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Use ( instead of "<<>><<URGENT<<>>><&gt

Status
Not open for further replies.

bitech

Programmer
May 19, 2001
63
US
I am trying to write an SQl statement in my Access Module. I can't use the " where they belong, is there a way I can use ( instead?

My SQL statement Reads:

DoCmd.RunSQL"UPDATE [Quarterly Report] SET [Quarterly Report].Jan = DSum("[Jan]",'Quarterly Report',"
='Number of New Corporate Members'")
WHERE ((([Quarterly Report].Category)="Total"));"

This code works when I use it in a query, but when I try to use it in the Module I get an error.​
 
If you have to use the DoCmd object...
After the first double quote and before the last double quote, wherever you need a double quote use & CHR(34) &

you might have to create a sqlstring variable first

also


you probably would be better of to use a SELECT SUM(field) FROM table instead of the DSUM
JHall
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top