Combo box looks empty

L

Laurel

I have a combo box which looks empty after you choose somethign from the
list. But the debugger shows that the data was chosen successfully. In
fact when I disable the combo box later in the process, the data shows up
(in expected 'disabled' form).

This has happened to me before, but it seemed to go away. This time there's
nothing I can do to make it show up in the display part of the combo box.
I've rebuilt it from scratch, and it has no code in it.

Any ideas?
 
J

John Vinson

I have a combo box which looks empty after you choose somethign from the
list. But the debugger shows that the data was chosen successfully. In
fact when I disable the combo box later in the process, the data shows up
(in expected 'disabled' form).

This has happened to me before, but it seemed to go away. This time there's
nothing I can do to make it show up in the display part of the combo box.
I've rebuilt it from scratch, and it has no code in it.

What are the following properties of the combo:

- Control Source
- Rowsource (post the SQL of the rowsource query)
- Column Count
- Column Widths
- Bound Column
 
L

Laurel

see below
But also important, it turns out that this phenomenon comes and goes. It
seems related (but I can't swear that the pattern matches) to the problem
described in the subsequent posting "allow additions/allow deletions causes
weird results."

John Vinson said:
What are the following properties of the combo:

- Control Source nothing

- Rowsource (post the SQL of the rowsource query)
SELECT tblClasses.Class_Code
FROM tblClasses;
 
J

John Vinson

see below
But also important, it turns out that this phenomenon comes and goes. It
seems related (but I can't swear that the pattern matches) to the problem
described in the subsequent posting "allow additions/allow deletions causes
weird results."

An unbound combo will indeed be blank when you open a form, since
there's nothing to tell Access which row you want selected; and if
it's on a Form that is not updateable, it will STAY blank since the
combo box will also be marked "not updateable". If you can't update it
you can't select a value from it!
 
L

Laurel

Do you have any idea why I can't update it? As I describe in the other
posting, the behavior does not match what I put in the Allow Additions,
etc., properties. What I want is this:

Allow Edits - Yes
Allow Additions - No
Allow Deletions - No
Data Entry - (I'm a little uncertain about this one, but I think it never
shows old records. This is not what I want, but it seems to be what I'm
getting, no matter how I set it.)

I have the problem when all three "allow" properties are set to 'yes'
(sometimes - for a while I thought I solved it by allowing additions, even
though I didn't want them, but the problem returned after I
compressed/repaired the database and/or after I exited and returned. I did
both things.)

How I have Data Entry set seems to have no affect.
 
L

Laurel

I fixed this by putting this line of code before a Me.Requery

Me.DataEntry = False

It's still a mystery why this was necessary, as the DataEntry property is
clearly set to false when viewed in the form properties window. And a
search of the whole database code doesn't uncover any hidden "DataEntry =
False" code. (I couldn't have put it in, as I didn't know about DataEntry
until this problem hit.)

This also fixed my problem with the invisible combo box data in posting
"allow additions/allow deletions cause weird results.
 

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