How to get data from forms into a table

thedeadzeds

Registered User.
Local time
Today, 04:16
Joined
Jan 8, 2014
Messages
40
Hi All,

Quick question,

I have built the attached database and have an issue the getting data from the form into the table.

Tbl_data is the main table where all data is stored. Within Frm_data I have added 3 text boxes that pull the FL, FLM and area from tbl_staff depending on the name chosen in the name combo (combo 89).

My question is how do I then get the data auto populated from the FL, FLM and Area from frm_data into tbl_data so I can then pull this data into queries and reports.

If you select Abiola Sokoya from the name drop down it will auto populate FL, FLM and area as an example.

Hope this makes sense.

Regards
 

Attachments

Thanks for that, I'm a little confused how that works, you you be able to give me an example on the attachment? No worries if you cant
 
Hi Guys,

I've tried various versions of this following the above link and can't get this to work. I ow have a message showing 'Microsoft access cant find the object Me, if me is a new marco make sure you have saved it and you have named it correctly.

Any help would be greatly appreciated
 
Thanks Paul but that doesn't really help I'm kind of new to this. Still unaware of how I do this? Is there any way you could show me an example on the attachment?
 
You don't do it, that's not how databases work. You link data, you don't copy data. You really need to work on the structure of your table before proceeding with forms/reports, etc..

For the issue you posted about, what you need to do is have an autonumber primary key in tbl_staff (e.g. Staff_ID). Then you need a field in tbl_data to capture that foreign key value (http://www.w3schools.com/sql/sql_foreignkey.asp) so that you can link the 2 sets of data. Then when you need to assign a staff to a record it just stores that number, and when you need to get data from both tables, you create a query linking them via that ID and you have all the fields available to you.

Again, you need to restructure your tables. There's really no point in have tables with just 1 field in them. tbl_workstream, tbl_area and all those others with one field, really shouldn't exist. Read up on normalization (http://en.wikipedia.org/wiki/Data_normalization).
 

Users who are viewing this thread

Back
Top Bottom