Learn how to a build a cloud-first strategyRegister Now


Assign a TABLE as the source object of the subform

Posted on 2004-11-07
Medium Priority
Last Modified: 2012-06-27

I have an unbound subform and the tables will be created on the fly base on the user input. How can I assign those tables as the source object of the subform by using VBA?

Thanks in advance
Question by:ishadowme
LVL 12

Accepted Solution

pique_tech earned 500 total points
ID: 12520059
Unless there's more to your question that it appears, you should be able to do something like this in code:
     Forms!MainFormName!SubFormName.Form.Recordsource = "TableName"

Author Comment

ID: 12520417
Hi Pique,

I got it going by using this code: Forms!MainFromName.SubFormName.SourceObject = "TableName" , which is pretty close to your comment. But thanks for your quick reply. I'm sure your code will work as well.


Featured Post

Transaction-level recovery for Oracle database

Veeam Explore for Oracle delivers low RTOs and RPOs with agentless transaction log backup and transaction-level recovery of Oracle databases. You can restore the database to a precise point in time, even to a specific transaction.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
If you’re using QODBC to update QuickBooks data from Microsoft® Access but Access is not showing the updated data, you could have set up QODBC incorrectly.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question