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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using Repeated / Duplicate Subforms

Status
Not open for further replies.

ZLAS

Programmer
Jun 21, 2007
1
0
0
US
I have master form with two child forms. Both child forms will point to the same unerlying table but use different filters. (One shows default records; the other shows non-default records.) The default record child form will be non-editable while the non-default record child form will allow insert/update/delete.

Is it possible to use the same subform for both child forms? If so how?

Thanks in Advance.
 
Yes, it is. You can set the recordsource of the form contained by the subform programmatically. You can set Allow Edits, also.

[tt]Me.TheSubformControlName.Form.RecordSource="Select * From tblTable"[/tt]
 
As above - have one button to set the rowsource to Defualt type and allowEdits to false, and Non-Default to allowedits=true

Remember to set a default when the main form opens by running the code onone of the buttons.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top