After update DLookup help required

  • Thread starter Thread starter Grumpy Willis
  • Start date Start date
G

Grumpy Willis

Hi,

I have this DLookup query that I have pretty much copied from one in another
database which works fine, I cannot see where I have gone wrong as it throws
a "3464 Data typr mismatch" error.


Me![Group_details] = DLookup("[Grp_Details]", "[QRY Group Details Select]",
"[Grp_Numbers] = " & Forms![FRM_Phone_Allocation]![All_Group])


I'm presuming that the error is saying that
![FRM_Phone_Allocation]![All_Group] & [Grp_Numbers] are different types of
data, but I'm pretty certain that they are both of character type.

Thanks!
Rich.
 
"Grumpy Willis" said:
Hi,

I have this DLookup query that I have pretty much copied from one in another
database which works fine, I cannot see where I have gone wrong as it throws
a "3464 Data typr mismatch" error.


Me![Group_details] = DLookup("[Grp_Details]", "[QRY Group Details Select]",
"[Grp_Numbers] = " & Forms![FRM_Phone_Allocation]![All_Group])


I'm presuming that the error is saying that
![FRM_Phone_Allocation]![All_Group] & [Grp_Numbers] are different types of
data, but I'm pretty certain that they are both of character type.

Thanks!
Rich.

Rich

If the fields are both strings, then you need to wrap the criteria in single
quotes (I've put spaces in to make it more obvious, but you don't actually need
them):

Me![Group_details] = DLookup("[Grp_Details]", "[QRY Group Details Select]",
"[Grp_Numbers] =' " & Forms![FRM_Phone_Allocation]![All_Group] & " ' ")
 
Back
Top