Show error message to user

  • Thread starter Thread starter Baz
  • Start date Start date
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
 
The field with the leading zeros is a Text type field?

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