Hi Peter,

The "Me" keyword only works in a VBA object module.  TO refer to a 
form's control in another control's property, you have to go the long 
way around:

Forms![form name]![control name]

The square brackets are optional if your object names have no spaces 
or other special characters.  So, in your case, assuming the form's 
name is frmEquip (I didn't see it mentioned but might have missed it):

Forms!frmEquip!cmbo_Make_ID

No need to specify ".Value", because it is the default property of 
the control.

Good luck,

Peter Hoogenboom

--- In [email protected], "Peter Groman" <[EMAIL PROTECTED]> 
wrote:
>
> I have 3 combo boxes on a form. The form is bound to table 
EQUIPMENT which
> has fields EQType_ID, Make_ID, and Model_ID among others. 
>  
> The first combo box is called cmbo_EQType_ID w/ Control source 
EQType_ID.
> Its row source is SELECT EQType.sys_id, EQType.Equipment_Type FROM 
EQType
> ORDER BY [Equipment_Type]; .  It works fine.
>  
> The second combo box is called cmbo_Make_ID w/ control source 
Make_ID.  Its
> row source is SELECT Make.sys_id, Make.Make FROM Make ORDER BY 
[Make]; It
> works fine.
>  
> The third combo box is called cmbo_Model_ID w/ control source 
Model_ID.  It
> has no row source.
>  
> The idea is that once a type (PC, Laptop, printer, etc) is 
selected, and a
> Make is selected (Hp, Compaq, DEll, IBM, etc) then the 3rd drop 
down is
> filtered by the first two.
>  
> So I put an ON CLICK event on the second combo box that enables 
combo box 3
> and sets it's row source to be the following:
>  
> SELECT Model.sys_id, Make.Make, Model.Model FROM Model inner join 
MAKE on
> Model.make_id = make.sys_id WHERE (((make.sys_ID)= Make_ID) and
> (model.EQType_ID) = EQType_ID) ORDER BY make.make, Model.Model; 
>  
> I did this because setting the 3rd box's row source in the object 
causes it
> to err out when I open the form & before I select a value in the 
first two
> boxes.
>  
> This works fine.  However, the WHERE statement does not appear to be
> working, as the 3rd box drop down list has all values, and not 
those that
> are depended on the values of box 1 & 2.  I've tried various WHERE
> statements like these to no avail:
>  
>  Where (((make.sys_ID)= [me].[Make_ID]) and (model.EQType_ID) =
> [me].[EQType_ID])
>  
>  Where (((make.sys_ID)= [me].[cmbo_Make_ID].[value]) and 
(model.EQType_ID) =
> [me].[cmbo_EQType_ID].[value])
>  
> I just keep getting prompt dialog boxes for values for the 
unidentified
> "[me].[cmbo_Make_ID].[value]"
>  
> Anyone have an idea how to fix this? Help!
>  
> Thanks.
>  
> -
> Pete
>  <blocked::blocked::mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED]
> 
> 
> [Non-text portions of this message have been removed]
>


Reply via email to