2 Queries on 1 form as a source of data

mcdhappy80

Registered User.
Local time
Today, 15:12
Joined
Jun 22, 2009
Messages
347
I have a very large query that JOINs 3 tables and I was thinking that maybe I could split it into two queries, one will hold all the data necessary for some VBA calculations and the other will hold some descriptive data that will only be used for reference. The both queries will have one PK field that will be the only record that appears in both queries.
I will see yet how will I store data, but I was wondering how can I reference fields in one of the two qeries from VBA, because maybe one of them (the first) will be forms record source and the other will not, so how would I reference the fields on the second (do I use the same syntax as referencing controls on subforms)?
Can someone write this down please?

Thank You.
 
... how can I reference fields in one of the two queries from VBA ...

You can not make a reference to a field in a query or table like you can a control on a form. Fields are not objects like control on forms. Note: forms and reports have control not fields. The controls are bound to the fields in the record source.

I normally open a recordset based on the query. This will allow you to reference the fields of the recordset.
 

Users who are viewing this thread

Back
Top Bottom