So...I'm trying to create a field that automatically calculates a value by gathering data from multiple tables.
My code seems to be fine, but MS Access returns with an error:
Run-time error '3464' - Data type mismatch in criteria expresssion
My code is as following:
For your reference:
1. The error occurs on the second line of the code (DLookup)
2. The data type for the field: "AccommodationT ype" is Number
3. The data type for the field: "AccommodationI D" is Number
4. The data type for the field: "Me.Accommodati on.Value" is Number
Any ideas?
My code seems to be fine, but MS Access returns with an error:
Run-time error '3464' - Data type mismatch in criteria expresssion
My code is as following:
Code:
Dim AccommodationType As String AccommodationType = DLookup("AccommodationType", "Accommodations", "AccommodationID = '" & Me.Accommodation.Value & "'")
1. The error occurs on the second line of the code (DLookup)
2. The data type for the field: "AccommodationT ype" is Number
3. The data type for the field: "AccommodationI D" is Number
4. The data type for the field: "Me.Accommodati on.Value" is Number
Any ideas?
Comment