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!

Source Object of subform changes when form is saved

Status
Not open for further replies.

phbarbara

Technical User
May 16, 2002
10
US
In Access 2000 I have a tab control form with 2 pages. Page 1 contains data fields about individual health care providers. This page also contains a subform "fsubExperDetail". This subform displays areas of expertise in a continuous form format. There is a command button below the subform to update the information. You hit the button, an unbound form with a multiselect listbox opens up, you make your selections and hit the update cmd button and the records are written to a table and the subform is requeried. This works fine. Page 2 contains only a subform "fsubProvSites" that links the Providers to all of the Sites where they practice. When I save the form after working on it and then reopen it, the page 2 subform has taken on the source object property of the subform from page 1 "fsubExperDetail". I have tried rebuilding the form, changing the names of the files and updating all of the code. I've based the subforms on queries and on SQL statements, No luck. The database window for this one also has a scroll bar that freezes until you resize the window and then it works again. I've updated and upgraded everything I can think of and have had no luck. Anyone with ideas?
 
How about putting something in the "On Open" or "On Load" event?

Something like:

Me.YourSubform.SourceObject = "FrmSourceObjectName"

Of course "YourSubform" is the name of the subform in your form and "FrmSourceObjectName" is the name of the form that you want to appear as a subform.

Hope that helps.

Adam

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top