dherragh
10-01-2001, 09:12 AM
Hi there,
I'm currently developing an inventory control database and I'm having a few problems. I have a form created for entering stock records which has textboxes for Manufacturer, Product and Serial Number. The serial number is entered by using a barcode scanner to input a 16 digit number. However, I need to be able to select a manufacturer and product and then be able to scan large numbers of items into the system without having to select manufacturer and product every time. Can this be done????
Any help gratefully appreciated.
Pat Hartman
10-01-2001, 07:55 PM
Add a button to pop up a form that will temporarily store the default manufacturer and product. In the close event for the popup, store the two fields in public variables that were defined in a standard code module. In the subform, add code to the AfterUpdate event of the SerialNumber field to populate the Manufacturer and Product fields from the variables.
Dave Sherer
10-01-2001, 08:21 PM
I am not to sure what you are say so I will post what I think you are saying.
1) You have a Manufactor Which has a series of products.
2) These products can have Multiple Serial(BarCode) numbers
if this correct then what I would do is actually what I did.
1) Create a Manufactor Table with A unique manufactorID and other manufactor info.
2) Create a product table with an uniquie ProductID and have the manufatcorId on this dtable also with product description and price etc.
3) Create a third table that will hold all the barcodes on this table you will have the ProductID number.
4) Create a Relationship with a one to many from manufactor to product then go from product to the barcodes with a one to many relationship.
what this does is basically say I have one manufactor that has many products and each of these products can have many barcodes.
5) Make a form off the barcode table with the wizard and select the datasheet view and call it BarcodeSubform.
6) Make another form off the products table and include a the BarcodeSubform on that form. Using the wizard it will allow you to link the forms by ProductID. Name it ProductSubform
7) Make Another but not off any table. keep it unbound include a subform ProductSubform. Save this form as frmManufactor. add a combobox to this form and have it list just the manufator's name
8) On the ProductSubform add a ComboBox and for the row source select the query builder add the table product to the query the select ProductID, ManufactorID uncheck the show box then select product name. In the Criteria under manufactorID type in
Forms!frmManufactor!ComboBox_Name
Save Everything <-- very important
then run the form frmManufactor what will happen is that you will have a combobox with a list of manufator names after selecting a manufatcor your subform will show with a ComboBox with a list of products for that Manufactor. after selecting a product your datasheet will show you all the barcodes listed for that product. you can also add barcodes to that list in that view.
make seperate forms off the tables that will allow you to add a manufactor and all needed info on that and a form off the products table that will allow you to add the manufactorID and the unique productID
If you have any problems with this let me know and I will try and help you. Contact me at DSherer@adatae.com or post message at www.adatae.com/accesshelp (http://www.adatae.com/accesshelp)