Populate List box control

G

Guest

I have a list box populated with a pass-through query. The list box is empty
when the form opens. This just started happening. A couple of days ago the
List box displayed selections.
The list box is unbound.
The rowSource property displays the correct query.
Any thoughts as to what to look at?
Thanks soooo much.
 
G

Guest

Hi, Sam.
I have a list box populated with a pass-through query. The list box is empty
when the form opens. This just started happening. A couple of days ago the
List box displayed selections.
The list box is unbound.
The rowSource property displays the correct query.
Any thoughts as to what to look at?

Things to check:

1.) If the Row Source displays the correct query name, then does this query
currently return records? Check the query's Returns Records Property. It
should be Yes. (Go ahead and run the query to verify that records are
displayed in the query.)

2.) Is the Row Source Type set to Table/Query?

3.) Does the Column Count include at least one column in the query that is
wide enough to be visible? (0.01" isn't wide enough for the Column Widths,
but something a little wider than this would have a noticeable vertical line,
but not necessarily visible text.)

4.) Is the Font Color Property different from the Back Color Property? Can
you read the word Unbound in the first line of the list box while in Design
View?

5.) Is the Font Size large enough to be seen? Again, the word Unbound will
show you if it's big enough.

6.) Does the Form's module have VBA code that changes any of these
properties to something that affects the display of the contents of the list
box?

HTH.

Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.

(Please remove ZERO_SPAM from my reply E-mail address, so that a message
will be forwarded to me.)

- - -
When you see correct answers to your question posted in Microsoft's Online
Community, please sign in to the Community and mark these posts as "Answers,"
so that all may benefit by filtering on "Answered questions" and quickly
finding the right answers to similar questions. (Only "Answers" have green
check-marks.) Remember that the best answers are often given to those who
have a history of rewarding the contributors who have taken the time to
answer questions correctly.
 
G

Guest

Thanks Gunny:
Yes to all the below items. I can get the lists displaying properly when I
click a button that sets the rowsource (there are a couple of choices of sort
order) but on opening the box is empty. It's okay as is because the user can
get the list after clicking. Just not what I would prefer.
 
G

Guest

Hi, Sam.
Yes to all the below items.

Then your VBA code is overriding the form's properties when the form opens.
If you want a default recordset to be displayed in the list box when the form
opens, then your VBA code needs to provide it -- or else refrain from
overriding the form's property settings (most likely the Row Source Property
is being overridden).

Perhaps we could make some suggestions on what to change or add to your VBA
code if you post the code that alters the properties I listed below.

HTH.

Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.

(Please remove ZERO_SPAM from my reply E-mail address, so that a message
will be forwarded to me.)

- - -
When you see correct answers to your question posted in Microsoft's Online
Community, please sign in to the Community and mark these posts as "Answers,"
so that all may benefit by filtering on "Answered questions" and quickly
finding the right answers to similar questions. Remember that the first and
best answers are often given to those who have a history of rewarding the
contributors who have taken the time to answer questions correctly.
 

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