I reread my reply to you and I made an error. Sorry!!
[forms]![nameofsubformcontrolonmainform].form![cbostate]
Should Be:
[forms]!{NameOfMainForm]![nameofsubformcontrolonmainform].form![cbostate]
Also, the white box on your main form is a subform control. The name of that
control is what you want for [nameofsubformcontrolonmainform] NOT the name
of your subform. The name of the subform control may or may not be the same
as the name of the subform.
Steve
"samdev" <la***@noblesoftwaresolutions.comwrote in message
news:5a**********************************@s50g2000 hsb.googlegroups.com...
On May 28, 2:15 pm, "Steve" <no...@email.comwrote:
When you open just the subform, the subform is a member of the database
forms collection so your [forms]![subform]![cbostate] notation correctly
identifies the subform. When you open the main form, the subform is a
member
of the main form's controls collection so your
[forms]![subform]![cbostate]
notation is not now correct because you are referencing the forms
collection
and not the main form's controls collection. The correct notation is
[forms]![nameofsubformcontrolonmainform].form![cbostate]. To get
"nameofsubformcontrolonmainform" , open the main form in design view,
select
the box that holds the subform, open Properties, go to the Other tab and
look at the Name property.
Steve
"samdev" <la...@noblesoftwaresolutions.comwrote in message
news:bd**********************************@j22g2000 hsf.googlegroups.com...
I have created two combo boxes in a subform....
For example
1. Combo Box State
2. Combo Box City
3. When a state from the Combo Box State is selected, the City combo
box updates to reflect the State chosen by only showing cities in that
selected state.
4. When I open just the subform it works just fine but when I open the
Main form the contains the subform there are issues....
5. I can pick the State just fine but when I go to pick the City - a
box = an "Enter Parameter Value" opens...requesting the value for
[forms]![subform]![cbostate]. The city combo box is now blank.
The row source for the city combo box is a query that contains the
city and the state field - the criteria for the state field [forms]!
[subform]![cbostate].
Not sure why it works, when I do test via the subform but doesn't work
when when I go the main form that includes the subform....
Any ideas would be very appreciated.
Thx!- Hide quoted text -
- Show quoted text -
Steve:
Thx - I have tried that it still doesn't work and it should from what
you have explained....I even changed the name of the subform in the
mainform and then went and updated the query and I'm still getting the
same parameter value box. I checked to make sure that I was clicking
on the subform box in the mainform by checking the title of the
property box and it reads Subform/subreport so still not sure what is
wrong.
Any other ideas.
Thx!