Combobox Conditional formatting

G

Guest

Hi,
I have a combobox with a queried source from a list table. the combobox is
in a datasheet and I'm using conditional formatting to highlight the cell
when it has focus. When I go to a new record row at very bottom of the sheet
and make a selection from the combobox scrolldown list it dosen't appear in
the cell -BUT- if I repeat the selection it does appear. If I remove the
conditional formatting it works fine. What is happening? is this an Access
bug?
Any help is dearly appreciated,
Thanks
Wendy
 
M

Marshall Barton

Wendy said:
I have a combobox with a queried source from a list table. the combobox is
in a datasheet and I'm using conditional formatting to highlight the cell
when it has focus. When I go to a new record row at very bottom of the sheet
and make a selection from the combobox scrolldown list it dosen't appear in
the cell -BUT- if I repeat the selection it does appear. If I remove the
conditional formatting it works fine. What is happening? is this an Access
bug?


What doesn't appear?

If its a new item in the list, where is the item added?

About all I can say at this point is that both requerying a
combo box and conditional formatting are done in lower
priority processing threads. I've never seen this
particular situation (if it's what I think it might be), but
maybe adding a DoEvents statement in the form's Current
event might(?) help get things back in sync.
 
G

Guest

Thanks for your reply,
When I click open the combobox list and select an item from the list and
click on it, that item does not get stored in the field on which the combobox
is acting on, instead, the field remains blank. When I immediately repeat the
selection a second time in the same combobox the selected item does get
stored in the field. But again, this problem only occurs when I'm entering
data in a new record.
also, the DoEvents statement did not help.
Thanks
 
M

Marshall Barton

That sounds very strange and I've never seen something like
that. Is there any code behind the form that interacts with
the combo box?

What is specified in these combo box's properties:
ControlSource
RowSource
ColumnCount
BoundColumn

Your use of the word "field" may be somewhat ambiguous here.
A combo box is a **control**, the columns in a table/query
are fields. Controls can be bound to a field, but controls
do not store anything. Instead, the value of a bound
control is saved (stored) to a table when the entire record
is saved. I think when you say that the "item does not get
stored in the field", you are saying that the combo box's
display box does not display the selected value. If that's
not what you're saying, please clarify what is happening.
 
G

Guest

that's right, the combo box's display box does not display the selected
value. In addition the selected value is not stored in the field to which the
combobox is bound.
This is a very simple stand alone form with no code that interacts with the
combobox. the combobox has these properties:
ControlSource = Medication
RowSource = SELECT List_Meds.Medication FROM List_Meds;
ColumnCount = 1
BoundColumn = 1
no event coding is used.

Thanks for pursuing this
Wendy

Marshall Barton said:
That sounds very strange and I've never seen something like
that. Is there any code behind the form that interacts with
the combo box?

What is specified in these combo box's properties:
ControlSource
RowSource
ColumnCount
BoundColumn

Your use of the word "field" may be somewhat ambiguous here.
A combo box is a **control**, the columns in a table/query
are fields. Controls can be bound to a field, but controls
do not store anything. Instead, the value of a bound
control is saved (stored) to a table when the entire record
is saved. I think when you say that the "item does not get
stored in the field", you are saying that the combo box's
display box does not display the selected value. If that's
not what you're saying, please clarify what is happening.
--
Marsh
MVP [MS Access]

When I click open the combobox list and select an item from the list and
click on it, that item does not get stored in the field on which the combobox
is acting on, instead, the field remains blank. When I immediately repeat the
selection a second time in the same combobox the selected item does get
stored in the field. But again, this problem only occurs when I'm entering
data in a new record.
 
M

Marshall Barton

You're right, that is extremely simple. I've never heard of
such behavior, especially when it works the second time you
select an item in the list.

If no one else, comes up with something, all I can suggest
is that there is some kind of corruption. I hate to bail
out with that kind of cop-out, but who knows? Try creating
a new blank database and set all of your options as needed,
e.g. NameAutoCorrect Off, Start UP form, etc. Then Import
**everything** from your existing database.
 

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

Top