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 / March 2005

Tip: Looking for answers? Try searching our database.

Combo Box with Query Source

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ckrogers - 29 Mar 2005 21:57 GMT
Hi!  I have a combo box with the following parameters:

    Name.................. Combo61
    Control Source..... JobID
    Row Source......... Job Query - By Mold
    Column Count...... 5
    Column Widths.... 0";0.5";1";2.5";1"
    Bound Column..... 1
    List Width............ 5"
    Limit to List.......... Yes
    Auto Expand......... Yes

The query has the following criteria: [Forms]![Tool Request Entry -
Approval]![MoldID]

When I have the form open for a specific mold, my combo box comes up empty.  
But if I leave the form open and independently run the query, it gives me the
correct list of jobs.  

I copied a combo box that is working to create this CBO ... but I can't get
this one to work.  Help, please!
Thanks!

Cindy
tina - 29 Mar 2005 22:14 GMT
you need to requery the combo box as you move from record to record, using
the form's Current event, and requery the combo box after you edit the
MoldID value in the current record, using the AfterUpdate event of the
control that's bound to the MoldID field. to requery, use

   Me!Combo61.Requery

hth

> Hi!  I have a combo box with the following parameters:
>
[quoted text clipped - 20 lines]
>
> Cindy
tina - 29 Mar 2005 22:17 GMT
oops, sorry, forgot i was in the macros newsgroup. you don't need to use
VBA; you can use the Requery action in a macro, specifying the Control Name
as Combo61.

hth

> you need to requery the combo box as you move from record to record, using
> the form's Current event, and requery the combo box after you edit the
[quoted text clipped - 32 lines]
> >
> > Cindy
ckrogers - 29 Mar 2005 22:35 GMT
Thanks, Tina - I will definitely incorporate that into my form ... but my
combo box isn't working even when the value of MoldID ISN'T changing on the
form.  I'm thinking I probably asked the question in the wrong newsgroup ...
I didn't notice I was in Access.Macros until after I had posted.  Should I
re-ask in "Forms"?

> oops, sorry, forgot i was in the macros newsgroup. you don't need to use
> VBA; you can use the Requery action in a macro, specifying the Control Name
[quoted text clipped - 39 lines]
> > >
> > > Cindy
tina - 29 Mar 2005 23:14 GMT
once you post a question in any newsgroup, best practice is to wait at least
a day after the last post to the thread, before re-posting the question to
the same, or another, newsgroup.

in this case, my answer wouldn't really have changed, since i gave both the
macro action and the VBA code that you need to requery the combo box.
whether the value of MoldID changes between records, or by user data entry,
at some point you still need to requery the combo box.

my first thought is that there is a problem with the query itself, but you
said it returns the correct records when you open it independent of the
form, so that seems unlikely. did you set up the VBA code or macro to
requery the combo box OnCurrent, and AfterUpdate (as specified in my
previous post)? if you did, and it still doesn't work, then my only other
suggestion is that you
1) double-check the combo box's RowSource to make sure you have the correct
query name in it, and
2) check the combo box's RowSourceType property to make sure it's set to
Table/Query.

hth

> Thanks, Tina - I will definitely incorporate that into my form ... but my
> combo box isn't working even when the value of MoldID ISN'T changing on the
[quoted text clipped - 45 lines]
> > > >
> > > > Cindy
ckrogers - 30 Mar 2005 03:45 GMT
Thanks, Tina!  That solved my problem!

> once you post a question in any newsgroup, best practice is to wait at least
> a day after the last post to the thread, before re-posting the question to
[quoted text clipped - 73 lines]
> > > > >
> > > > > Cindy
 
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.