More help needed on combo boxes

  • Thread starter Thread starter Evert
  • Start date Start date
E

Evert

I have posted previously on this and got some excellent help. However, I ran
into a muck bar when I try to use it in a subform. My dilema is:

I have created 2 combo boxes in a form. the first combo box runs a query that
gives me the choices for the second combo box.
After inserting a piece of code that Mr B. sent me (please see the thread
Combo boxes and queries 7/30/08) in the After_Update control of the first
combo box it worked fine. ( Me.Transferred_From_Position.Requery)
When I try to run the same configuration in a subform it reverts to the
query parameter box. However, it works with no problem as a stand alone
form.

Am I missing something or this is just the way it is?

your help would be appreciated

Evert
 
Hi Evert,

(firstly, you need to put all the information pertinent to your question
in your post -- we normally will not take the time to lookup other posts
and wade through the responses to find needed info - thank you)

"However, it works with no problem as a stand alone form."

if your criteria is on a subform, you need to modify the criteria of
your query to this:

forms!formname!subform_controlname.form.controlname


Warm Regards,
Crystal

remote programming and training

Access Basics
8-part free tutorial that covers essentials in Access
http://www.AccessMVP.com/strive4peace

*
(: have an awesome day :)
*
 
Thank you Crystal, I will keep your advice in mind from now on.

I did change the criteria as you suggested and still shows me the "enter
paramenter value" box.
Here is what I got
SELECT TblDepartment.Department, [Tbl Job Positions].[Job Position]
FROM TblDepartment INNER JOIN [Tbl Job Positions] ON
TblDepartment.[Department ID] = [Tbl Job Positions].[Department ID]
WHERE (((TblDepartment.Department)=[forms]![SOP subfrm]![Transferred
From].[frmSOPPersonnel].[Transferred From]));

is this correct?

Thanks
 
Hi Evert,

instead of:
[forms]![SOP subfrm]![Transferred From].[frmSOPPersonnel].[Transferred From]

try this:
[forms]!formname.[SOP subfrm].form.[frmSOPPersonnel].form.[Transferred From]

assuming:
formname is the name of the main form
the control NAME of the first subform is --> SOP subfrm
the control NAME of the second subform is --> frmSOPPersonnel

Warm Regards,
Crystal

remote programming and training

Access Basics
8-part free tutorial that covers essentials in Access
http://www.AccessMVP.com/strive4peace

*
(: have an awesome day :)
*



Thank you Crystal, I will keep your advice in mind from now on.

I did change the criteria as you suggested and still shows me the "enter
paramenter value" box.
Here is what I got
SELECT TblDepartment.Department, [Tbl Job Positions].[Job Position]
FROM TblDepartment INNER JOIN [Tbl Job Positions] ON
TblDepartment.[Department ID] = [Tbl Job Positions].[Department ID]
WHERE (((TblDepartment.Department)=[forms]![SOP subfrm]![Transferred
From].[frmSOPPersonnel].[Transferred From]));

is this correct?

Thanks





strive4peace said:
Hi Evert,

(firstly, you need to put all the information pertinent to your question
in your post -- we normally will not take the time to lookup other posts
and wade through the responses to find needed info - thank you)

"However, it works with no problem as a stand alone form."

if your criteria is on a subform, you need to modify the criteria of
your query to this:

forms!formname!subform_controlname.form.controlname


Warm Regards,
Crystal

remote programming and training

Access Basics
8-part free tutorial that covers essentials in Access
http://www.AccessMVP.com/strive4peace

*
(: have an awesome day :)
*
 
Back
Top