Log in

View Full Version : Equipment iss and training TABLES (Queries?


gwallace1
Nov 24, 2008, 12:24 AM
Just the basic start to my database... Three tables. One id tblEmployee (employeeID) is key, tblInventoryItem)InvItem) is key... I am trying to build a for that updates a table (I think) as I issue inventory to employees. Multiple inventory Items can be issued to one employee. I am trying to use a subform linked to the table files with the item name to populate the drop down menu for the item I am going to issue... save it and move on, but I cannot get it to work? Is this not one-to-Many? Am I missing something when it comes to issuing equipment/gear to employees via a subform. Once I enter the equipment... does it get saved to a newq table? Any Help is appreciated. PS I am reading ms access inside/out and I think I am more confused than when I started?? Thanks in advance... PS I am eventually going to also link the employee to a training and work (job record) table that I can track... not too crazy, but it's driving me that way.
Should I use the tables, or use queries to generate the info, and once I do where is it stored??
Greg

ScottGem
Nov 24, 2008, 08:07 AM
This sounds like a standard lending library type application. You should be able to find a template on microsoft.com for this. For example a video store app.

You need at least three data tables here. The employee table listing all employees, the equipment table listing all the equipment to be signed out and a transactions table listing the signouts. The transactions table is actually in a many to many with the other two, since an employee can signout multiple pieces of equipment and a piece of equipment can be signed out by mutlitple employees.

The transactions table should look like this:

TblTransactions
TransactionID (PK Autonumber)
EmployeeID (foreign Key)
EquipmentID (FK)
TransactionDate
TransactionType

TransactionType is either In or Out.

To enter tranasactions you have a form where you select employee and equipment from comboboxes, enter the date and indicate the type. This form can be a subform to either the Employee table and/or Equipment table.

gwallace1
Nov 25, 2008, 02:10 AM
Works to a point... The employeeID populates the combobox. The equipment dropdown menu (combobox works great, but For each new record in the row in the subform it just copies the previously entered information... I screwed it up somewhere... I'll learn a little more and come see if I can formulate a better educated question... unless you know the answer... Thanks again.

ScottGem
Nov 25, 2008, 07:06 AM
Sounds like you created an unbound combobox for equipment. Make sure the Controlsourse is the Equipment foreign key.

gwallace1
Dec 1, 2008, 02:00 AM
Ok got it thanks... That worked. I have a form almost identical to the northwind employee form. I have a tab that is supposed to be issued equipment. What I want to do is when I view an employee I click on the "Issued equipment" tab I want to be able to view a list of the equipment I issued via the transactions form. I thought it would simply be a subform... but I am not sure what to do to have only the equipment issued to the employee currently being viewed... what does the control source of the subform need to be to view only the current employee's issued equipment? PS... I can't thank you enough... Much appreciated.

ScottGem
Dec 1, 2008, 11:01 AM
If you use the Subform wizard, it walks you through the process of creating the linked fields. You should be linking on employee ID so that the subform is filtered for the employee currently being viewed on the main form.