Using list box adds blank record to lookup table

M

mmanis

Hello, I have a form (frmpurchases) based on a query. My query is based on
two tables. tblPurchases (master table) and tblItems (lookup table describing
the item category). The field link between the two tables is the field
called Items.

On frmPurchases, there is a list box for selecting the type of Item. which
once selected, autofills various other fields with the Items details.
Everything seems to work fine and I have no problem adding records etc. The
one glitch I can't figure out, is everytime I add a new purchase using
frmpurchases and select the Item(list box), when I go out of the database and
come back in, there is a new blank record in my TblItems for every new
purchase I entered. So if I select the list box again, there will be blanks
in the list for every new record.

How can I prevent my lookup table from adding blank records with each new
purchase.
 
D

Daryl S

Mmanis -

You can step through the code to find the problem, but it could be eaiser to
make the field a required field in the Items table. Then wherever in the
code it is adding a blank record, it will error out - at that point you can
select the Debug option and then fix the code.
 

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

Top