From: mmanis on 27 Apr 2010 00:22 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.
From: Daryl S on 27 Apr 2010 10:31 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.
|
Pages: 1 Prev: Cancel/BeforeUpdate Event Procedure Next: How to convert AVCHD M2TS/MTS to iPad on Mac |