Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Subforms linked to subforms but no main form!

Status
Not open for further replies.

gobble

Technical User
Mar 21, 2002
28
GB
I have a form which is not linked to anything as it only has buttons. I have created two subforms on this form as I want both to be seen in datasheet view. One has users and the other training information. However I cannot get it so that when you are on a user the information about training is shown for that user only in the second subform. I have got this to work when it is a main form and subform but I cannot do this as I want to see both on datasheet view. Does anyone have any suggestions?

Thanks

Juls
 
Base the second form's data on a query that uses the first form's User information. You can even set the second form to refresh itself when you change users on the first form.

This should work if you have your tables joined correctly. User(1) ---> Training(~n)


78.5% of all statistics are made up on the spot.
Another free Access forum:
More Access stuff at
 
Thanks Wildhare

I have the two forms linked together so when I click on a user the training information is shown. However I cannot enter any information or new records. It isn't locked or disabled but I set the property to Data Entry Yes the records disappear so only the headings show. What am I doing wrong?

Thanks

Juls
 
DataEntry=YES means that you will be using the form(s) ONLY for data entry - don't show any existing records.

The only reason you would NOT be able to enter new information is if the link joining the tables or the query you're using doesn't supply the KEY value(s) for the new record you're adding. This sometimes happens when you go to add a new record on the Many side of a one-many join and you don't supply the foreign key. Test this by running the query for the suspect form, and seeing if you can add a record to the raw dataset it produces. If you get an message on the status line to the effect that "the dataset is not updateable", then something's wacky with your join.

78.5% of all statistics are made up on the spot.
Another free Access forum:
More Access stuff at
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top