Hi
I am wanting a DLookup to check to see if a contact is already listed in a table.
I reckon I am OK using their forename, surname and first address line.
I have currently got, but know it isn't working and am at a loss to work out which bit(s) are wrong:
All three fields are text strings.
If some SQL whizz could sort me out I would be most appreciative. I am afraid I really struggle with these. Seem to have almost got the hang of a single criteria but this one has me stumped!
Any help appreciated
Thanks and best wishes
I am wanting a DLookup to check to see if a contact is already listed in a table.
I reckon I am OK using their forename, surname and first address line.
I have currently got, but know it isn't working and am at a loss to work out which bit(s) are wrong:
Code:
intConId = DLookup("lngConId", "tblContacts", "[strConSname] = " & "'" & Me.txtSname & "'" And "[strConFname] = " & "'" & Me.txtFname & "'" And "[strConAdd1] = " & "'" & Me.txtAddr1 & "'")
If some SQL whizz could sort me out I would be most appreciative. I am afraid I really struggle with these. Seem to have almost got the hang of a single criteria but this one has me stumped!
Any help appreciated
Thanks and best wishes