F
FattyFatty
Hi All,
I'm come across a brick wall and am after some help! I'm wanting to use
the value of a control (a combo box) on a subform in my query as the
criteria for my query.
The problem is that I'm getting this error message when running the
query (yes, the form is open): "The expression is typed incorrectly, or
it is too complex to be evaluated...." etc.
I'm using access 2003.
Here's what I have:
The main form is called: frm_C01_MaintainTeamsAndStaff
The subform is called (i.e. the actual form):
frm_C05_Sub_MaintainTeamDetails_DeleteTeam
The name of the subform on the main form is called (i.e. the name of
the subform "control" on the main form):
subfrm_C05_Sub_MaintainTeamDetails_DeleteTeam
The name of the control on the subform I'm wanting to reference in the
query is called: cmb_TeamName
My query is only returning 3 fields:
Staff_Name_Full
Staff_TeamNumber
Staff_ActiveIndicator
The Staff_TeamNumber field criteria is:
[Forms]![frm_C01_MaintainTeamsAndStaff]![subfrm_C05_Sub_MaintainTeamDetails_DeleteTeam].[Form]![cmb_TeamName]
According to the Microsoft website, I'm using the correct syntax:
http://support.microsoft.com/?kbid=209099#appliesto
"To refer to a control on a subform, use the following syntax:
Forms![main form name]![subform control name].Form![control name]"
Can anyone direct me in the right direction??
Thanks
I'm come across a brick wall and am after some help! I'm wanting to use
the value of a control (a combo box) on a subform in my query as the
criteria for my query.
The problem is that I'm getting this error message when running the
query (yes, the form is open): "The expression is typed incorrectly, or
it is too complex to be evaluated...." etc.
I'm using access 2003.
Here's what I have:
The main form is called: frm_C01_MaintainTeamsAndStaff
The subform is called (i.e. the actual form):
frm_C05_Sub_MaintainTeamDetails_DeleteTeam
The name of the subform on the main form is called (i.e. the name of
the subform "control" on the main form):
subfrm_C05_Sub_MaintainTeamDetails_DeleteTeam
The name of the control on the subform I'm wanting to reference in the
query is called: cmb_TeamName
My query is only returning 3 fields:
Staff_Name_Full
Staff_TeamNumber
Staff_ActiveIndicator
The Staff_TeamNumber field criteria is:
[Forms]![frm_C01_MaintainTeamsAndStaff]![subfrm_C05_Sub_MaintainTeamDetails_DeleteTeam].[Form]![cmb_TeamName]
According to the Microsoft website, I'm using the correct syntax:
http://support.microsoft.com/?kbid=209099#appliesto
"To refer to a control on a subform, use the following syntax:
Forms![main form name]![subform control name].Form![control name]"
Can anyone direct me in the right direction??
Thanks