If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Using list box adds blank record to lookup table
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. |
#2
|
|||
|
|||
Using list box adds blank record to lookup table
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. -- Daryl S "mmanis" wrote: 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. |
Thread Tools | |
Display Modes | |
|
|