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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SYNTAX field with space

Status
Not open for further replies.

Chavito21

Programmer
Mar 26, 2003
230
US
Hi everyone,

I have a table with a field named "Date added"
When I try to write the following code:

CNT2 = DCount("*", "ORDERS", "Salesman='" & [Forms]![SALE_REPORT_F]![INIT_IN] & "' And Date added between #" & [Forms]![SALE_REPORT_F]![FROM_IN] & "# AND #" & [Forms]![SALE_REPORT_F]![TO_IN] & "#")

so I get the following error:
Syntax error (missing operator) in query expression 'Saleman='JB' and Date added between #4/1/2004# AND #4/10/2004#

How can I solved this problem without changing the name of the field on the table.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top