Show error message to user

B

Baz

Hi there
On the data base you have to enter a seven digit part no
code, it then searches for the record. Is there anyway I
can show a message if not all seven digits are entered.
Some part nos are only 5 digits but the the lookup table
has them in this format e.g. 0012345, if the user only
enters 5 digits it does not find it. Or alternativly is
there away to automatically insert zeros if the user
inputs less than seven digits. Hope this all makes sense.

thanks
 
A

Allen Browne

The field with the leading zeros is a Text type field?

If so, try:
DLookup("PartNo", "MyTable", "PartNo = """ & Format([PartNo], "0000000") &
"""")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Add missing zero's to customer number 3
Input Mask question 2
changing text content 2
Checking Military Dates 14
decimal formatting 2
coverting numbers to words 1
Form.Show problem 2
Input Mask Errors 2

Top