Combo Box with Query Source

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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
 
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


tina said:
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


ckrogers said:
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
 
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"?

tina said:
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


tina said:
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


ckrogers said:
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
 
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


ckrogers said:
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"?

tina said:
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


tina said:
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:

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
 
Thanks, Tina! That solved my problem!

tina said:
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


ckrogers said:
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"?

tina said:
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
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:

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
 
Back
Top