Forms not populating fields from table

  • Thread starter Thread starter Alexis
  • Start date Start date
A

Alexis

Guest
I created a table by data entry, and then decided to create a form that pulls data from that table and 2 others in order to make a more userfriendly interface. Now after completing the form I want to see the previously entered data from the table show up in the form fields and I can't figure out how to pull that information in. I thought it would automatically show up since the form refers to the tables (and the tables are linked in a one-to-one relationship), but apparently not. Then when I try to enter the primary key variable (no duplicates) that I've already entered into the table, I get the No duplicate value message. So the form "knows" the information already exists in the table, it's just not showing it in the form.

Any ideas?
 
The recordsource of the form needs to be a query that joins the two tables. Then you will be able to bind controls to anything in the form's recordsource. BTW, the query needs to use a left join unless EVERY row in tbl1 has a cooresponding row in tbl2.
 
I don't know whether this is of any use, but when you have created your query and consequently your form there is quite an easy way of bringing up data for a specific record - eg you want to bring up the record of employee Ref 2018 so that you can change their address. If you create a header for your form and put in a combo box (follow the wizard which talks you through this and choose the option which says "select a record on the form based on the value I select in the combo box). Then when you go back into form view you can type 2018 into the combo box and it will automatically skip to the record for 2018.

Any probs, this is something I've done a lot so just shout!
 

Users who are viewing this thread

Back
Top Bottom