Im having problems getting my "simple" Dlookup to work looking for some help please !
I have a table tblEuroHol
with a key fileld made up of Country Code ie IT and a date ie IT04/04/2010
In a form I have a before update event which creates a string CheckD
I am trying to then lookup this field against the tblEuroHol key field as below
I can check datas in the table against my form dates no problem
If DLookup("HolDate", "tblEuroHol", "[HolDate]= ADD") Then
but I need to also check against the CountryCode
Dim CheckD As String
CheckD = Me.CountryCode & Me.ADD
If DLookup("Key", "tblEuroHol", "'[Key]= CheckID '") Then
I am getting error 13 type mismatch and cannot resolve
Any help appriciated
Steve
I have a table tblEuroHol
with a key fileld made up of Country Code ie IT and a date ie IT04/04/2010
In a form I have a before update event which creates a string CheckD
I am trying to then lookup this field against the tblEuroHol key field as below
I can check datas in the table against my form dates no problem
If DLookup("HolDate", "tblEuroHol", "[HolDate]= ADD") Then
but I need to also check against the CountryCode
Dim CheckD As String
CheckD = Me.CountryCode & Me.ADD
If DLookup("Key", "tblEuroHol", "'[Key]= CheckID '") Then
I am getting error 13 type mismatch and cannot resolve
Any help appriciated
Steve