Access 2000 Frt End connected to SQL 2000
I am trying to ck for the existance of a record in another table with
the same ClientID and Date.
I am ck'ing for a record in tblMedInfo that has the same "ClientID"
(Long Interger) and "DateEntered" (Short Date mm/dd/yyyy) as the form
"frmClients.ClientID" and "frmClients.LastUpdate"
Yet again, it's the sql statement that has me stumped.
Dim dbs As Database
Dim rst As Recordset
Dim qry As String
Dim vDate As Date
vDate = Me.LastUpdate
Set dbs = CurrentDb()
qry = "Select * from tblMedInfo where tblMedInfo.[ClientID] = " &
Forms!frmClients.[ClientID] & "" And (((tblMedInfo.DateEntered) = " & #
vDate # & "))
Set rst = dbs.OpenRecordset(qry, dbOpenDynaset)
If rst.RecordCount 0 Then
MsgBox "Record Exsist"
Else
MsgBox "Will Open And Add Record"
End If
Any Suggestions Appreciated
Dale