combo box display result

B

bpauley

I have a combo box on a form that is filtered to one record based on
previous selections on the form.
My question is how to get the one record to display in the combo box
automatically, so the user does not have to click the down arrow and select
the one record.
The combo box name that I want to display the filtered record is:
cboCurrRateAmt
Control Source of the combo box: CurrRateAmt
Field in the tblFacilityRates that I want to display: RateAmt

SQL Row Source:
SELECT tblFacilityRates.RateAmt, tblFacilityRates.FacilityID,
tblFacilityRates.RateTypeID, tblFacilityRates.RateTypeDescription,
tblFacilityRates.RateType
FROM tblFacilityRates
WHERE
(((tblFacilityRates.FacilityID)=[forms]![frmEnterMonthlyVisits].[cbofacilityID])
AND
((tblFacilityRates.RateTypeID)=[forms]![frmEnterMonthlyVisits].[cboRateTypeID])
AND
((tblFacilityRates.RateTypeDescription)=[forms]![frmEnterMonthlyVisits].[txtposition]))
ORDER BY tblFacilityRates.FacilityID, tblFacilityRates.RateTypeID,
tblFacilityRates.RateTypeDescription
WITH OWNERACCESS OPTION;

Thanks for your input.

novice user,
Bill
 
R

ruralguy via AccessMonster.com

Try:
Me.cboCurrRateAmt = Me.cboCurrRateAmt.ItemData(0)
I have a combo box on a form that is filtered to one record based on
previous selections on the form.
My question is how to get the one record to display in the combo box
automatically, so the user does not have to click the down arrow and select
the one record.
The combo box name that I want to display the filtered record is:
cboCurrRateAmt
Control Source of the combo box: CurrRateAmt
Field in the tblFacilityRates that I want to display: RateAmt

SQL Row Source:
SELECT tblFacilityRates.RateAmt, tblFacilityRates.FacilityID,
tblFacilityRates.RateTypeID, tblFacilityRates.RateTypeDescription,
tblFacilityRates.RateType
FROM tblFacilityRates
WHERE
(((tblFacilityRates.FacilityID)=[forms]![frmEnterMonthlyVisits].[cbofacilityID])
AND
((tblFacilityRates.RateTypeID)=[forms]![frmEnterMonthlyVisits].[cboRateTypeID])
AND
((tblFacilityRates.RateTypeDescription)=[forms]![frmEnterMonthlyVisits].[txtposition]))
ORDER BY tblFacilityRates.FacilityID, tblFacilityRates.RateTypeID,
tblFacilityRates.RateTypeDescription
WITH OWNERACCESS OPTION;

Thanks for your input.

novice user,
Bill
 
B

bpauley

thank you for the reply.
Where were you suggesting to but your response?
Bill

ruralguy via AccessMonster.com said:
Try:
Me.cboCurrRateAmt = Me.cboCurrRateAmt.ItemData(0)
I have a combo box on a form that is filtered to one record based on
previous selections on the form.
My question is how to get the one record to display in the combo box
automatically, so the user does not have to click the down arrow and
select
the one record.
The combo box name that I want to display the filtered record is:
cboCurrRateAmt
Control Source of the combo box: CurrRateAmt
Field in the tblFacilityRates that I want to display: RateAmt

SQL Row Source:
SELECT tblFacilityRates.RateAmt, tblFacilityRates.FacilityID,
tblFacilityRates.RateTypeID, tblFacilityRates.RateTypeDescription,
tblFacilityRates.RateType
FROM tblFacilityRates
WHERE
(((tblFacilityRates.FacilityID)=[forms]![frmEnterMonthlyVisits].[cbofacilityID])
AND
((tblFacilityRates.RateTypeID)=[forms]![frmEnterMonthlyVisits].[cboRateTypeID])
AND
((tblFacilityRates.RateTypeDescription)=[forms]![frmEnterMonthlyVisits].[txtposition]))
ORDER BY tblFacilityRates.FacilityID, tblFacilityRates.RateTypeID,
tblFacilityRates.RateTypeDescription
WITH OWNERACCESS OPTION;

Thanks for your input.

novice user,
Bill
 
B

bpauley

No dice, I get the same number for all of the records when I scroll through
them.
Thanks for the reply. Any other suggestions.
Bill

ruralguy via AccessMonster.com said:
Try the CurrentEvent of the form.
thank you for the reply.
Where were you suggesting to but your response?
Bill
Try:
Me.cboCurrRateAmt = Me.cboCurrRateAmt.ItemData(0)
[quoted text clipped - 29 lines]
novice user,
Bill
 
R

ruralguy via AccessMonster.com

I assume it is an unbound ComboBox so how about:

Me.cboCurrRateAmt.Requery
Me.cboCurrRateAmt = Me.cboCurrRateAmt.ItemData(0)

...in the Current Event of the Form.
No dice, I get the same number for all of the records when I scroll through
them.
Thanks for the reply. Any other suggestions.
Bill
Try the CurrentEvent of the form.
[quoted text clipped - 7 lines]
 
B

bpauley

I believe my original post explained that the control source of the
cboCurrRateAmt is CurrRateAmt.
Does that mean that it is bound?
Maybe I should be looking to make the drop-down active on "gotfocus" of
cboCurrRateAmt. That is make it drop-down whenever the user tabs to the
control. Can you assist with that process?
Again I am a somewhat novice user, please explain in detail.
Thank for your assistance.
Bill

ruralguy via AccessMonster.com said:
I assume it is an unbound ComboBox so how about:

Me.cboCurrRateAmt.Requery
Me.cboCurrRateAmt = Me.cboCurrRateAmt.ItemData(0)

..in the Current Event of the Form.
No dice, I get the same number for all of the records when I scroll
through
them.
Thanks for the reply. Any other suggestions.
Bill
Try the CurrentEvent of the form.
[quoted text clipped - 7 lines]
novice user,
Bill
 
R

ruralguy via AccessMonster.com

You are correct Bill that the ComboBox is in fact bound. Sorry for not
reading your first post more carefully. Does anything display in the cbo when
you move to a new record? What is the Bound Column of the cbo and what do you
have in the Column Count and Column Widths properties?
I believe my original post explained that the control source of the
cboCurrRateAmt is CurrRateAmt.
Does that mean that it is bound?
Maybe I should be looking to make the drop-down active on "gotfocus" of
cboCurrRateAmt. That is make it drop-down whenever the user tabs to the
control. Can you assist with that process?
Again I am a somewhat novice user, please explain in detail.
Thank for your assistance.
Bill
I assume it is an unbound ComboBox so how about:
[quoted text clipped - 14 lines]
 
B

bpauley

Nothing displays when I go to new record (the first 3 combo boxes on the
form set what is displayed in cboCurrRateAmt)
Bound col is 1
column count is 5
widths: 0.7";0.65";0.65";0.5";0.5"

ruralguy via AccessMonster.com said:
You are correct Bill that the ComboBox is in fact bound. Sorry for not
reading your first post more carefully. Does anything display in the cbo
when
you move to a new record? What is the Bound Column of the cbo and what do
you
have in the Column Count and Column Widths properties?
I believe my original post explained that the control source of the
cboCurrRateAmt is CurrRateAmt.
Does that mean that it is bound?
Maybe I should be looking to make the drop-down active on "gotfocus" of
cboCurrRateAmt. That is make it drop-down whenever the user tabs to the
control. Can you assist with that process?
Again I am a somewhat novice user, please explain in detail.
Thank for your assistance.
Bill
I assume it is an unbound ComboBox so how about:
[quoted text clipped - 14 lines]
novice user,
Bill
 
B

bpauley

I did find answer to the dropdown question I asked.
place Me!cboCurrRateAmt.dropdown on on enter. When the user tabs to the
combo box the dropdown drops.

bpauley said:
I believe my original post explained that the control source of the
cboCurrRateAmt is CurrRateAmt.
Does that mean that it is bound?
Maybe I should be looking to make the drop-down active on "gotfocus" of
cboCurrRateAmt. That is make it drop-down whenever the user tabs to the
control. Can you assist with that process?
Again I am a somewhat novice user, please explain in detail.
Thank for your assistance.
Bill

ruralguy via AccessMonster.com said:
I assume it is an unbound ComboBox so how about:

Me.cboCurrRateAmt.Requery
Me.cboCurrRateAmt = Me.cboCurrRateAmt.ItemData(0)

..in the Current Event of the Form.
No dice, I get the same number for all of the records when I scroll
through
them.
Thanks for the reply. Any other suggestions.
Bill

Try the CurrentEvent of the form.

[quoted text clipped - 7 lines]
novice user,
Bill
 
R

ruralguy via AccessMonster.com

So this field in the table has not been filled in yet correct? Did you try:

Me.cboCurrRateAmt.Requery
Me.cboCurrRateAmt = Me.cboCurrRateAmt.ItemData(0)

...yet in the Current event of the form?
Nothing displays when I go to new record (the first 3 combo boxes on the
form set what is displayed in cboCurrRateAmt)
Bound col is 1
column count is 5
widths: 0.7";0.65";0.65";0.5";0.5"
You are correct Bill that the ComboBox is in fact bound. Sorry for not
reading your first post more carefully. Does anything display in the cbo
[quoted text clipped - 18 lines]
 
B

bpauley

No difference. the combo box still requires tabbing to it, I now have it set
to dropdown on enter. So I have to click the dollar amount and tab on.
Thanks for your patience with this problem, much appreciated.
Bill


ruralguy via AccessMonster.com said:
So this field in the table has not been filled in yet correct? Did you
try:

Me.cboCurrRateAmt.Requery
Me.cboCurrRateAmt = Me.cboCurrRateAmt.ItemData(0)

..yet in the Current event of the form?
Nothing displays when I go to new record (the first 3 combo boxes on the
form set what is displayed in cboCurrRateAmt)
Bound col is 1
column count is 5
widths: 0.7";0.65";0.65";0.5";0.5"
You are correct Bill that the ComboBox is in fact bound. Sorry for not
reading your first post more carefully. Does anything display in the cbo
[quoted text clipped - 18 lines]
novice user,
Bill
 
R

ruralguy via AccessMonster.com

Sorry, I should have given you that 1st thing. Did the other trick do
anything?
I did find answer to the dropdown question I asked.
place Me!cboCurrRateAmt.dropdown on on enter. When the user tabs to the
combo box the dropdown drops.
I believe my original post explained that the control source of the
cboCurrRateAmt is CurrRateAmt.
[quoted text clipped - 24 lines]
 
R

ruralguy via AccessMonster.com

Have fun with the rest of the project Bill.
No difference. the combo box still requires tabbing to it, I now have it set
to dropdown on enter. So I have to click the dollar amount and tab on.
Thanks for your patience with this problem, much appreciated.
Bill
So this field in the table has not been filled in yet correct? Did you
try:
[quoted text clipped - 15 lines]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top