Ask Your Question

Entering data into my table from a form

asked 2016-06-16 15:41:12 +0200

Deep gravatar image

I am very new to databases, and I need some help creating a form. I am trying to create a database that will log who had what device and what sim when

I have multiple tables and forms

I have a first name table, last name table, and department table. In the form I have created I see the data (e.g. Chris) but it returns the Key into a "Staff" Table

so if you read my Staff Table I have a field for Employee number, First Name, Surname, Department but the data sorted are just the key reference to the other tables.

I have a table for handsets and again the data stored against IMEI, Make and Model are the key references to the IMEI, Make and Model Tables

And my last section is Sims again the data in the "Sims" table is the Key reference for the tables Serial No, Phone Number and Network.

So now I have the Who, device and Sim. I need to be able to bring them together so this person, this device with this sim

so 2 questions. If I use IMEI for example. I have the readable data (as in the IMEI number itself) in the Table IMEI number, but the device key ID I want returned is in the Handset Table. How do I create a form that lets me read the data for 1 table (IMEI Numbers) but return the data from another table (Devices) and store that information in a 3rd table (Issue Log)

My second question is, There are multiple first name and multiple surnames, who do I make the form so I enter a first name and a last name and it knows I am referring to that employee.

So I have Employee Code key First Name Surname 0 Joe Jones 1 Chris Jones 2 Joe Smith

because I under first name I put Chris and under surname I put Jones I want the database to know I am referring to employee code key 1

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2016-06-16 17:23:31 +0200

Ratslinger gravatar image

It appears you have an awful lot of tables with redundant data. Example - first name table, last name table, and department table have same info in Staff table. IMEI just popped up out of nowhere. Seems like a key maybe?

There is a lot more but to the issues. Usually you can get data in one table to display based upon the selection of a record in another table using subforms. To illustrate this go to this link click here and download the sample on comment #9. This sample shows how to select data on one table based upon the selection of data in another table. Reading post #1 in that answer will give you a sense of what is going on in that DB. Storing the information in a third table depends upon what is being stored. Typically creation of new records based upon other tables requires using macro programming and if you are new to DB's then macro code is well beyond this conversation.

Again, using names for unique ID is not a good choice. They can be duplicated.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2016-06-16 15:41:12 +0200

Seen: 66 times

Last updated: Jun 16 '16