Verifying number exists in query

D

Dirk_Bob

I have an edit form that I open after some one enters the appropriate NC#.
How do I validate if that number exists before opening the edit form?
 
L

Lance

if dcount("[NC# Field]","[TABLE WITH NC# FIELD]",[NC# FIELD] = [WHATEVER
NUMBER]) > 0 then..else..end if
 
D

Dirk_Bob

Lance,

Thanks, I understand the code. Where should this be placed?
--
Dirk


Lance said:
if dcount("[NC# Field]","[TABLE WITH NC# FIELD]",[NC# FIELD] = [WHATEVER
NUMBER]) > 0 then..else..end if


Dirk_Bob said:
I have an edit form that I open after some one enters the appropriate NC#.
How do I validate if that number exists before opening the edit form?
 
L

Lance

Try putting it in the afterupdate event of whatever control you're entering
your NC# in.

Dirk_Bob said:
Lance,

Thanks, I understand the code. Where should this be placed?
--
Dirk


Lance said:
if dcount("[NC# Field]","[TABLE WITH NC# FIELD]",[NC# FIELD] = [WHATEVER
NUMBER]) > 0 then..else..end if


Dirk_Bob said:
I have an edit form that I open after some one enters the appropriate NC#.
How do I validate if that number exists before opening the edit form?
 
Top