> For some reason I have the hardest time with DLookup syntax. Please
> help!
[quoted text clipped - 11 lines]
> For the life of me I don't know why it's giving me this grief.
> thanks.

Signature
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
I still get the same error message. I think the single/double can be used
interchangeably here. The problem is with the criteria in the third argument.
-Brian
> > For some reason I have the hardest time with DLookup syntax. Please
> > help!
[quoted text clipped - 14 lines]
> You have single quotes around the first argument instead of double quotes. The
> inside quotes for the space should be single instead as well.
Duane Hookom - 13 May 2005 14:27 GMT
I expect MEMBER_ID is text. If so, try set the third arguement to:
"[MEMBER_ID]=""" & [Primary_Contact] & """"

Signature
Duane Hookom
MS Access MVP
--
>I still get the same error message. I think the single/double can be used
> interchangeably here. The problem is with the criteria in the third
[quoted text clipped - 20 lines]
>> quotes. The
>> inside quotes for the space should be single instead as well.
BrianS - 13 May 2005 14:51 GMT
Nope. It's a number. It's my autonumber key field for the tblMembership, and
thus the basis for my table linking.
I tried what you provided anyway, just for kicks, and got the type mismatch
error message.
-Brian
> I expect MEMBER_ID is text. If so, try set the third arguement to:
> "[MEMBER_ID]=""" & [Primary_Contact] & """"
[quoted text clipped - 23 lines]
> >> quotes. The
> >> inside quotes for the space should be single instead as well.
Duane Hookom - 13 May 2005 15:25 GMT
I expect you have some records with a Primary_Contact of NULL. Try this
"[MEMBER_ID]=" & Nz([Primary_Contact],-1

Signature
Duane Hookom
MS Access MVP
--
> Nope. It's a number. It's my autonumber key field for the tblMembership,
> and
[quoted text clipped - 34 lines]
>> >> quotes. The
>> >> inside quotes for the space should be single instead as well.
BrianS - 13 May 2005 16:02 GMT
That's it!
Thanks -- I completely overlooked the fact that a null value in
Primary_Contact would screw things up.
thanks!
Brian
> I expect you have some records with a Primary_Contact of NULL. Try this
> "[MEMBER_ID]=" & Nz([Primary_Contact],-1
[quoted text clipped - 37 lines]
> >> >> quotes. The
> >> >> inside quotes for the space should be single instead as well.
Rick Brandt - 13 May 2005 15:22 GMT
> I still get the same error message. I think the single/double can be
> used interchangeably here. The problem is with the criteria in the
> third argument. -Brian
In my test this worked...
TestFld: DLookup('FieldName', "TableName")
This did not...
TestFld: DLookup('FieldName' & " " , "TableName")
Nor did this...
TestFld: DLookup('FieldName' & ' ' , "TableName")
So apparently the single quotes are ok as long as you are not doing any
concatenation.

Signature
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
Ken Snell [MVP] - 13 May 2005 20:28 GMT
This should work:
TestFld: DLookup("FieldName & ' ' " , "TableName")

Signature
Ken Snell
<MS ACCESS MVP>
>> I still get the same error message. I think the single/double can be
>> used interchangeably here. The problem is with the criteria in the
[quoted text clipped - 11 lines]
> So apparently the single quotes are ok as long as you are not doing any
> concatenation.