Field Validation (1 Viewer)

mreference

Registered User.
Local time
Today, 05:50
Joined
Oct 4, 2010
Messages
137
I have a field on a form that users input a stock code, called [StkCode]

I would like to check that the code input does exist, which is located in another table before the record is saved in the table.

The other table is called [tblStockItems] and the text field is called [StockCode]

Any help would be appreciated :)
 

mreference

Registered User.
Local time
Today, 05:50
Joined
Oct 4, 2010
Messages
137
Thank you for the reply, if I am not mistaken, it looks as though DCount is used for counting records.

Please tell me me if I am incorrect.

I would like to verify that a stock code input on my form e.g. ABC123 is actually in my stock table. If its not, then I was hoping to have a message that indicates it doesn't exist.
 

JHB

Have been here a while
Local time
Today, 06:50
Joined
Jun 17, 2012
Messages
7,732
Thank you for the reply, if I am not mistaken, it looks as though DCount is used for counting records.
Exactly - it counts record, so if Dcount = 0 your stock code isn't in the table or said on another way, if Dcount > 0 your stock code is in the table.
 

Users who are viewing this thread

Top Bottom