B
Bryan Hughes
Hello,
I have subforms that load depending on the selection on a cbo.
The recordsource is set by an SQL string from the main form in the cbo
change event.
All of my subforms load correctly except for one.
Everytime I try to load it I receive the following Error:
Error No: 3075; Description Syntax error (Missing Operator) in query
expression '[CRAEM] tblClient_Referral WHERE [CFID] = '"[strCriteria]".
I am assuming this being caused by a null value in the [CRAEM] field.
Here is the code used to load subform:
Me.subClient_Information.SourceObject = "fsubClient_Referral"
strSQL = "SELECT DISTINCTROW CFID, CRD, CRBN, CRB, " _
& "CRA, CRASA, CRAC, CRAS, CRAZ, CRAPE, CRAEM " _
& "tblClient_Referral WHERE CFID='" & strCFID & "';"
Me.subClient_Information.Form.RecordSource = strSQL
Me.subClient_Information.Visible = True
Me.subClient_Information.SetFocus
Would a null value in the field cause this error?
How should I fix it?
If not what is the problem and how should I fix it?
Thank you for the help.
-Bryan
I have subforms that load depending on the selection on a cbo.
The recordsource is set by an SQL string from the main form in the cbo
change event.
All of my subforms load correctly except for one.
Everytime I try to load it I receive the following Error:
Error No: 3075; Description Syntax error (Missing Operator) in query
expression '[CRAEM] tblClient_Referral WHERE [CFID] = '"[strCriteria]".
I am assuming this being caused by a null value in the [CRAEM] field.
Here is the code used to load subform:
Me.subClient_Information.SourceObject = "fsubClient_Referral"
strSQL = "SELECT DISTINCTROW CFID, CRD, CRBN, CRB, " _
& "CRA, CRASA, CRAC, CRAS, CRAZ, CRAPE, CRAEM " _
& "tblClient_Referral WHERE CFID='" & strCFID & "';"
Me.subClient_Information.Form.RecordSource = strSQL
Me.subClient_Information.Visible = True
Me.subClient_Information.SetFocus
Would a null value in the field cause this error?
How should I fix it?
If not what is the problem and how should I fix it?
Thank you for the help.
-Bryan