Can Somebody Help me, What the syntax Error IS

sadiqsabia

Registered User.
Local time
Yesterday, 22:25
Joined
Sep 3, 2008
Messages
18
I need Help please. I am trying to do a chooser form similiar to one user had posted.

PICOffen- Text
PICNos-Number
ChapOff-Text

I have input the following code in the queries but i get syntax error.

The Whole line is as below.

DCount("[PICOffen]","tblPICItems","[PICNos]
= " & [[Forms]![frmRecords]![tblPIC subform].[Form].[PICNO]] & " And [PICOffen] ='" & [ChapOff] & "'")
 
You seem to have extra brackets (shown in red). Try removing them.

Code:
DCount("[PICOffen]","tblPICItems","[PICNos]= " & [COLOR="Red"][[/COLOR][Forms]![frmRecords]![tblPIC subform].[Form].[PICNO][COLOR="Red"]][/COLOR] & " And [PICOffen] ='" & [ChapOff] & "'")

If that doesn't work, try writing the expression with real valid values

Code:
DCount("[PICOffen]","tblPICItems","[PICNos]= 23 And [PICOffen] ='aChapOffvalue'")

hth
Chris
 
You seem to have extra brackets (shown in red). Try removing them.

Code:
DCount("[PICOffen]","tblPICItems","[PICNos]= " & [COLOR="Red"][[/COLOR][Forms]![frmRecords]![tblPIC subform].[Form].[PICNO][COLOR="Red"]][/COLOR] & " And [PICOffen] ='" & [ChapOff] & "'")

If that doesn't work, try writing the expression with real valid values

Code:
DCount("[PICOffen]","tblPICItems","[PICNos]= 23 And [PICOffen] ='aChapOffvalue'")

hth
Chris


Removing the brackets helped. I thought i was just grouping them by putting the brackets
 

Users who are viewing this thread

Back
Top Bottom