By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,655 Members | 1,773 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,655 IT Pros & Developers. It's quick & easy.

Switchboard problem

P: 2

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
  1. Private Sub cmdOdpriIRLovex_Click()
  2. On Error GoTo Err_cmdOdpriIRLovex_Click
  4.     Dim stDocName As String
  5.     Dim stLinkCriteria As String
  7.     stDocName = "frmIR"
  8.     DoCmd.OpenForm stDocName, , , stLinkCriteria
  10. Exit_cmdOdpriIRLovex_Click:
  11.     Exit Sub
  13. Err_cmdOdpriIRLovex_Click:
  14.     MsgBox Err.Description
  15.     Resume Exit_cmdOdpriIRLovex_Click
  16. End Sub
Feb 2 '08 #1
Share this Question
Share on Google+
1 Reply

Expert Mod 15k+
P: 31,712

This is a perfect example of why you should not design your database that way.
This data should be stored in the same tables but containing different data in the rercords. (See Normalisation and Table structures for a fuller explanation.)

You can change the Data Source for a form though. What difficulty are you having (You don't show what you've tried or explain where you're stuck).
Feb 5 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.