Accessing a hiden query field

morsagmon

Registered User.
Local time
Today, 20:12
Joined
Apr 9, 2010
Messages
35
Hello.
Might you know how can I access a field that is part of the underlying query of a form, from another control on that form?

I have a "Comments" field that is part of formA underlying query, but is not visible on formA (not bound to any control!).

I would like to retrieve and update that field from another textbox on the father form of formA (mainForm).

Intuitively, for the default value of my textbox, I'd write something like:
Me!formA.Comments

If there's no way to access a field of the underlying query of a form, the workaround would be to place a hidden control on formA, bound to that field, but I'd like to avoid this ugly solution.

Thanks!
 
Try referencing it with just [Comments] as in:
[Comments] = "A new value"
 
RuralGuy,

Thank you, but this doesn't work.
Here's one side of the situation:
I have a textbox on mainForm - txtComments.
On mainForm, I have a subform sfrmFormA.
sfrmFormA holds a subform that is based on a query - qryQuery.
qryQuery has a field - Comments, that is not bound to any control on sfrmFormA - just included in the query.

What do I need to put in txtComments "default value" property, in order for it to show the comments field of qryQuery?

Thanks!
Mor
 
OK guys.
I found a solution.
I'm using code to exchange values between the textbox on the main form and a dummy field I put on the subform, hidden.

Thanks!
 

Users who are viewing this thread

Back
Top Bottom