Subforms

  • Thread starter Thread starter hshafter
  • Start date Start date
H

hshafter

Guest
I noticed that many of these postings are very technical and I apologize that mine will not be.

I have a form called G2 based on a table called Candidates. My key field in Candidates is called Name.
I have a subform based on the a table called Notes, which also has a Name field. I linked the two name fields as a one-to-many relationship. I dragged the Notes table into my G2 form and everything works fine, except, the name does not automatically show up in each new record like it does for my other databases. Instead it comes up as G2, and I have to type in the name each time I want to add a new record. Do you know how I can fix this?

Thank you
 
Open the subform and display the properties. Look at the data source, which you stated was a table. To the right of the datasource field in the properties window, you will see a ... button. Click on it and you should invoke the query builder. The basics of what you have your form based off of should automaticcally be displayed. Now look for the table that actually contains the Name files (probably the one your main form is based off of) and add this table to the query. Join the two Name field by left clicking on one and dragging it to the other. Once you have the relationship established, replace the EXISTING Name filed in the query with the Name filed from the table you just added to the query.

In short, I think you are trying to display a look up field and it will only show the key coulmn value. What I stated above will eliminate that problem.
 
It seems like your text box isn't bound correctly to the field you want. Hard for me to say without seeing an example. Also, I would suggest you not use 'Name' for any of your field names. Possibly 'Candidate' or 'CandidateName'.
 
I changed the name of the field from Name to Candidates and it worked. I've been trying to get the subform to automatically insert the name of the current record in the main form for weeks! Thank you very much!
 

Users who are viewing this thread

Back
Top Bottom