Link to home
Start Free TrialLog in
Avatar of NickPereza
NickPereza

asked on

Create a dynamic SQL/Query for a sub form

Does anyone know if there is a way to use a SQL statement for a sub form.  Or some way to use a recordset or querydef (that is not a created query object)?  Because you can use objects like queries or tables as your sourceobject for your sub form, I was hoping that I would could in some way use a SQL statement (that is created dynamically).

Any ideas anyone?  Any help would be appreciated.  Thanks.
ASKER CERTIFIED SOLUTION
Avatar of mcallarse
mcallarse
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
NOTE: If you will be using a temporary query, would suggest creating a query on main form open, using that query for all changes while the form is open, then deleting the query -- db.querydefs.delete "myTempQuery" -- on main form close. If you have multiple users accessing your database, would suggest this approach, as opposed to a single query used for all updates.
Hi NickPereza,
This question has been abandoned and needs to be finalized (112 days since last comment).

   You can accept an answer, split the points, or get a refund. Go to
   http://www.cityofangels.com/Experts/Closing.htm for information and options.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

nexusnation
EE Cleanup Volunteer for Microsoft Access
Avatar of 1William
1William

No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
Accept question, points to mcallarse
Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

1William
EE Cleanup Volunteer