Code:
UID = Me.cmbox_1.Value + "-" + Me.txtField1.Value
UIDCount = DCount("[CarID]", "Cars", "[Cars.CarID] Like '" & UID & "*'")
If UIDCount > 0 Then
do something,
Else exit sub
End If
UID is concatenated values from two values entered on a form.
I am trying to take this concatenated value and query the cars table to see it contains the string UIDCount
Say the UID is Honda-Civic
In my cars table I have the values in the field CarID
Honda-Civic-Red
Honda-Civic-Blue
Then the UIDCount would return a value of two.
The problem is it returns the value 0. Ideas as to why?