I need to know if a record exits or not

bensplace

New member
Local time
Today, 19:15
Joined
Mar 22, 2008
Messages
4
I am embarrassed to ask the question as I thought I knew more than I do about VBA programming in Access.
Ill spell my problem out and hope someone can point me in the right direction.

I have a database called “e1 records”
And two data fields called “Date1” and “Day/night”

When I load a form to enter information I want to check that a record exits or not, depending on the outcome it will open a new record for writing or open at the exiting record for editing

So when it loads I need it to check if the date I enter in text1 field (date) and Day or night in text2 field (Day or night) exists or not

Eg 22/2/12 and Day exists = edit

If 22/2/12 does not exists = new record

Please any help
 
Try looking for FindFirst and NoMatch for a Recordset object:
Some explanation from the Help file:If a record matching the criteria isn't located, the current record pointer is unknown, and the NoMatch property is set to True.
 

Users who are viewing this thread

Back
Top Bottom