How can I refer to closed form, table or query?

Ramzess II

Registered User.
Local time
Today, 22:07
Joined
Apr 7, 2004
Messages
32
Hello!

Is it possible to make a reference from a code within a report to a certain field in a form which is based on query or table? Or maybe it is better to refer
to that query or table this form is based on? Anyway, is it possible and if it is, - how?

By now I have to open the form where this certain field is and only then I can open a form, otherwise I get error about field which could not be found.

Thank you in advance.
 
Ramzes,

In order for a field on a form to have a value, the form must
be open.

If the form is not open, you can open the form's RecordSource
(table or query) and retrieve the information from there.

Wayne
 
You can open the form and keep it hidden from view with the following code

Code:
DoCmd.OpenForm "Name of Form", , , , , acHidden

You can then refer to fields on the form, just remember to close the form when you're finished with it.

HTH
 

Users who are viewing this thread

Back
Top Bottom