D
die_laffin via AccessMonster.com
Hi
I'm having a bit of a problem with this Dlookup:
If DLookup("[Company Ref]", "Main", "[Company Ref] ='" & Forms!
[frmUpdateClaim]![Company Ref] & "' and [Registration Number] ='" & Forms!
[frmUpdateClaim]![Registration Number] & "' and [Settled] ='" & -1) Then
I get error:
Syntax error in string in query expression '[Company Ref] ='12345' and
[Registation Number] = 'b111bbb' and [Settled] ='-1'.
The Dlookup function worked ok before I tried to add in the "settled" part:
If (DLookup("[Company Ref]", "Main", "[Company Ref] ='" & Forms!
[frmUpdateClaim]![Company Ref] & "' and [Registration Number] ='" & Forms!
[frmUpdateClaim]![Registration Number] & "'")) Then
"Settled" is not on the form, I am just trying to check the value of this
Yes/No field in the "Main" table and open different forms based on the result.
Any assistance would be gratefully appreciated,
Thanks
die_laffin
I'm having a bit of a problem with this Dlookup:
If DLookup("[Company Ref]", "Main", "[Company Ref] ='" & Forms!
[frmUpdateClaim]![Company Ref] & "' and [Registration Number] ='" & Forms!
[frmUpdateClaim]![Registration Number] & "' and [Settled] ='" & -1) Then
I get error:
Syntax error in string in query expression '[Company Ref] ='12345' and
[Registation Number] = 'b111bbb' and [Settled] ='-1'.
The Dlookup function worked ok before I tried to add in the "settled" part:
If (DLookup("[Company Ref]", "Main", "[Company Ref] ='" & Forms!
[frmUpdateClaim]![Company Ref] & "' and [Registration Number] ='" & Forms!
[frmUpdateClaim]![Registration Number] & "'")) Then
"Settled" is not on the form, I am just trying to check the value of this
Yes/No field in the "Main" table and open different forms based on the result.
Any assistance would be gratefully appreciated,
Thanks
die_laffin