Help referencing a table by name

WinDancer

Registered User.
Local time
Today, 10:06
Joined
Oct 29, 2004
Messages
290
I have a table that contains all the archived table names.

This set of tables names all have the same name, followed by the date it was archived. ie "Random 1/1/2007"

I built a form that displays those names.

When the customer picks a specific table how do I open a form to display just the data from that specific table?

Thanks,
Dave
 
1. Create a form to display the table data and name it frmBaseForm

2. Bind it to one of the tables so that the controls are bound to the appropriate fields.

3. Open the base form by using this: DoCmd.OpenForm "frmBaseForm", acViewNormal

4. In the Load Event of the Base form use this code:
Code:
    Me.RecordSource = Forms!YourFormToSelectTheTableName!YourTableNameField
    Me.Requery

That SHOULD work for you.
 
Thanks, Bob. I will work on this tomorrow.
 
I had a few unplanned minutes today- your code, as usual, works perfectly..Thanks!
 
That is cool because for me that was hypothetical. I haven't done something like that before, but I was hoping my logic would work. Thanks for letting me know about your success.

GladWeCouldHelp.png
 

Users who are viewing this thread

Back
Top Bottom