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

Automatically linking Form to New Table Part 2

Status
Not open for further replies.

Webslinger1275

Technical User
Jul 9, 2004
2
US
I guess I should have asked the question first, huh?

How do I automatically link a Form to a Newly created table (possibly all within a macro)?

Sorry about the last posting, I'm new at this.....obviously.

Thank you in advance.
web
 
Open the form in design mode then in the Form properties and under Recordsource enter the name of the table(click the down arrow, or click the three dots and create query.


if the form is in normal mode, you can create a table with the field called strRecSource (text type, 255) Enter the name of the table or the SQL statement in this field, then in the on open event of the form,

Me.RecordSource = DLookup("strRecSource", "TableName")

Hope this helps
Dalain
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top