Try this code:
Dim Db As DAO.Database
Dim Rst As DAO.Recordset
Set Db = CurrentDB
Set Rst = Db.OpenRecordset("Tbl_Days")
Rst.FindFirst "[DateFieldNameInTable = #" & Me!TxtDate & "#"
If Not Rst.NoMatch Then
MsgBox "Date already in system"
<<Do whatever when date is already in system>>
End If
Rst.Close
Set Rst = Nothing
Set Db = Nothing
--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com www.pcdatasheet.com
"Josh Armstrong" <jo***********@socal.rr.com> wrote in message
news:b6*************************@posting.google.co m...
In a small scheduling DB that I created, I had a list of dates. When
the user clicks on a Merge button, I need the system to look at the
list and see if a date exists if it does give a message.
For example...
me.txtDate = 12/01/03
user clicks merge, the db looks at tbl_Days if it finds it,
msgbox(Date already in system)
I have been messing with dlookup but just can't get it to work.