Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Macros / July 2005

Tip: Looking for answers? Try searching our database.

totally stumped

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
r - 27 Jul 2005 18:11 GMT
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

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.