You normally shouldn't have multiple tables with the same or very similar
field structures. This suggests a non-normalized table structure. However,
you could place code in the On Open event of the report like:
Dim strTable As String
strTable = InputBox("Enter a table name") & ""
If Len(strTable) >0 then
Me.RecordSource = strTable
End If
A nice solution would have a combo box on a form that would contain a list
of record sources. Then your code might look like:
Dim strTable As String
strTable = Forms!frmA!cboRecordSource & ""
If Len(strTable) >0 then
Me.RecordSource = strTable
End If
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.