W
Wayne-I-M
Hi all
TblClients
CD1stName = Text
CDSurname = Text
CDDateofBirth = Time/Date
The form is feb by a query and the date of birth used in the form is …..
CDDateOfBirth:
DateSerial(qryOnLineBookingsUKOP_QueryFeeder!Personal_DOBYear,qryOnLineBookingsUKOP_QueryFeeder!Personal_DOBMonth,qryOnLineBookingsUKOP_QueryFeeder!Personal_DOBDay)
Dim strID As String
strID = Nz(DLookup("[CDClientID]", "[TblClients]", "[CD1stName] ='"
& Form!txt1stName & "' AND [CDSurname] = '" & Form!txtSurname & "'AND
[CDDateofBirth] = '" #& Form!txtDateofBirth &# "'"), "0")
If strID = "0" Then
Etc
Etc
This “will†find records – one’s that were type in on a key board. Also if
the date of birth is taken out of the criteria it works fine – so I guess the
problem is the date of birth and how it being constructed. (DateSerial).
I just need to find out if a record already exists and if it does ..do one
thing. If it doesn't .. do something else.
I can post the whole button code if need but it's quite long.
If anyone understands the above (is the syntax correct ?) and can give any
tips it would be “really†helpful (been looking this for hours).
Many thanks
TblClients
CD1stName = Text
CDSurname = Text
CDDateofBirth = Time/Date
The form is feb by a query and the date of birth used in the form is …..
CDDateOfBirth:
DateSerial(qryOnLineBookingsUKOP_QueryFeeder!Personal_DOBYear,qryOnLineBookingsUKOP_QueryFeeder!Personal_DOBMonth,qryOnLineBookingsUKOP_QueryFeeder!Personal_DOBDay)
Dim strID As String
strID = Nz(DLookup("[CDClientID]", "[TblClients]", "[CD1stName] ='"
& Form!txt1stName & "' AND [CDSurname] = '" & Form!txtSurname & "'AND
[CDDateofBirth] = '" #& Form!txtDateofBirth &# "'"), "0")
If strID = "0" Then
Etc
Etc
This “will†find records – one’s that were type in on a key board. Also if
the date of birth is taken out of the criteria it works fine – so I guess the
problem is the date of birth and how it being constructed. (DateSerial).
I just need to find out if a record already exists and if it does ..do one
thing. If it doesn't .. do something else.
I can post the whole button code if need but it's quite long.
If anyone understands the above (is the syntax correct ?) and can give any
tips it would be “really†helpful (been looking this for hours).
Many thanks