Form Values in query

  • Thread starter Thread starter Lori
  • Start date Start date
L

Lori

I created a query that was to use a sub forms value to
update a field. When I open the sub form alone the query
works correctly if I don't reference the main form. When
I run it in the main form, referencing the main and sub
form, it doesn't ask for a value but the query doesn't run.

[Forms]![frmCancelTicket]![frmCancelTicketSub1]!
[Investment#]

Cancel Ticket is the main form and CancelTicketSub1 is the
sub.

Please help.

Thanks

Lori
 
Try:
[Forms]![frmCancelTicket]![frmCancelTicketSub1].[Form]![Investment#]

For an explanation of the ".Form" bit, see:
Referring to Controls on a Subform
at:
http://members.iinet.net.au/~allenbrowne/casu-04.html

If that still does not work:
1. Open your main form in design view.
2. Right-click the edge of the subform control, and choose Properties.
3. On the Other tab of the Properties box, what is the Name of the subform
control? Its Name can be different from its Source Object (the name of the
form it contains).
 
Back
Top