IŽm making a switchboard in design view.
The 1st level of the switchboard contains different partners.
The 2nd level contains OpenForm(s), OpenReport(s) commands for every partner.
The form(s) and report(s) are always the same...for example...frmOne and rptOne, but every partner has his own tables, queries...for example tblOnePartner1, tblOnePartner2, tblTwoPartner1, tblTwoPartner2. The table One and table Two has the same structure and contains the same type of data for all partners.
IŽd like to add to the cmdButton(s)_OnClick event a statement that would change the RecordSource property..
Any ideas? Thx for your response.
the OpenForm code was made by the cmdButtonŽs wizard and looks like this:
Expand|Select|Wrap|Line Numbers
- Private Sub cmdOdpriIRLovex_Click()
- On Error GoTo Err_cmdOdpriIRLovex_Click
- Dim stDocName As String
- Dim stLinkCriteria As String
- stDocName = "frmIR"
- DoCmd.OpenForm stDocName, , , stLinkCriteria
- Exit_cmdOdpriIRLovex_Click:
- Exit Sub
- Err_cmdOdpriIRLovex_Click:
- MsgBox Err.Description
- Resume Exit_cmdOdpriIRLovex_Click
- End Sub