Still can't get this.
I have a main menu form (MainMenu) on which there are two controls, a
dropdown (SelectedID) and a button.
The dropdown (SelectedID) does not have a control source because it is just
a list to select from. The row source is a table (Customers) that has only
two fields, CustNo (text) and CustName (text). The control is bound by the
first column, CustNo.
The button runs a macro that opens another form (CustDetail) and uses
OpenForm with a Where criteria of
[CustomerID]=[Forms]![MainMenu]![SelectedID].
The detail form (CustDetail) is bound to a table (Budget) where there are
two fields, CustomerID (text), and BudgetAmt (currency).
When I click the button, I get a dialog box asking me to enter the value for
[Forms]![MainMenu]![SelectedID].
I just don't get it!!!! What am I doing wrong?! Is this because the
dropdown on the main menu form doesn't have a control source?!
Help!
Ken Snell [MVP] - 27 Jul 2005 19:26 GMT
Try this for the OpenForm:
DoCmd.OpenForm "CustDetail", , , "[CustomerID]=" & Me!SelectedID

Signature
Ken Snell
<MS ACCESS MVP>
> Still can't get this.
>
[quoted text clipped - 24 lines]
>
> Help!
Steve Schapel - 28 Jul 2005 11:21 GMT
> When I click the button, I get a dialog box asking me to enter the value for
> [Forms]![MainMenu]![SelectedID].
>
> I just don't get it!!!! What am I doing wrong?! Is this because the
> dropdown on the main menu form doesn't have a control source?!
No, it is not related to the combobox being unbound. The most likely
cause of this is a spelling error. Are you sure the form is named
MainMenu? Are you sure the combobox is named SelectedID? Er, you don't
have a Close action in your macro before the OpenForm action do you?

Signature
Steve Schapel, Microsoft Access MVP