Can I run a query based on a value in a subform?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I would like to run a query based on a value in a subform. Subform is
displayed based on a value chosen from the combo box. How can I accomplish
this?
 
monia13 said:
I would like to run a query based on a value in a subform. Subform is
displayed based on a value chosen from the combo box. How can I accomplish
this?


To reference a control's value on a subform:

Forms!mainformname.subformcontrolname.Form.controlname
 
I tried that and I'm getting a promt window to enter the value:

Forms!CAS_Exceeding_Frm.CAS_EX_By_RCA_subform1.Form.CAS_ID

I replaced spaces between words in the name of the form, subform and control
name with underscore _
 
Unless you changed the name to have underscores instead of
spaces ***everywhere*** it is used in your entire
application, that won't fix the problem. While spaces and
other funny characters can cause this kind of problem, you
can deal with it by enclosing the name in [ and ]

Forms![CAS Exceeding Frm].[CAS EX By RCA subform1].Form.[CAS
ID]

But it is better not to use spaces in names so you don't run
into this kind of confusion.
 
Back
Top