How do I take a form field(item number) and validate it to a table

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I created a form for a data enterer to enter inventory received, but I need
validation checks to make sure the data enterer enters a valid part number
from a table I created, can anyone help?
 
Eileen

If I interpret your description literally, you are requiring your data
enterer to type in a part number. If so, why?!

If you already have a table of valid part numbers, use a combo box that lets
that user select a valid number. Otherwise, you are giving the user the
oppportunity to be wrong, and to be corrected by a computer (always a
frustrating experience).

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
Eileen,
The easiest method is to offer the user a combo box based on that
external PartNo table.
By using LimitToList = True, the user can not enter/selcet a
non-legitimate PartNo from that combo.

--
hth
Al Campagna
Access MVP 2007
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love, and you'll never work a day in your life."
 
Ok I tried that but when I try to enter data it gives me an error that the
field cannot be null, why is it not seeing the combo box data?
 
I did create a combo box, but it isn't entering data into the table. They can
select an item from the combo box but it comes up like nothing has been
selected.
 
Because your combo box is not a bound control.
This is a normal situation.
A combo used to find a part number and make that part number's record the
current record should not be a bound control. If you try to do a lookup with
a bound combo, you will change the part number of the current record which is
problably not what you want. But, you do need a bound control so the
partnumber will be updated in the table.
This I usually do with an unbound combo and a bound text box. It also
involves using the Limit To List event of the combo.
 
ok a new problem, 1st field combo box item number - 2nd field textbox for
quantity - 3rd field combo box location after selecting from location for the
last field I hit enter to save record. It does not until it goes back to 1st
field combo box and hit enter again. Why is this and can I fix it?
 
Eileen,
Sounds like your combobox is not "bound" to field in your table.
The ControlSource for the combo should be the PartNO field, and the
RowSource should be a query that delivers all possible (legitimate) PartNos
from your PartNo table.

--
hth
Al Campagna
Access MVP 2007
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love, and you'll never work a day in your life."
 
Back
Top