1
votes

I created a ListBox in a form. Its RowSource is being filled by VBA, but the ListBox is empty.

When I open the Query in the RowSource, Access returns rows, but the ListBox itself is empty. Is this a bug, or am I missing something?

enter image description here
list box is empty

enter image description here

2
To help attract answers, could you please include a code snippet? And welcome to SO :)Andy Danger Gagne

2 Answers

0
votes

Since you state:

Its RowSource is being filled by VBA, but the ListBox is empty.

You may need to Requery the list box after modifying the content of its Row Source -

ListBoxName.Requery

Change ListBoxName to suit the name of your control.

You may also want to check that the Column Width is non-zero.

0
votes

Seems like there was a problem with the query. The Column "Art" was defined as a boolean. Even though it should work when querying it with 1, when specified as a RowSource, it needed to be queried with true instead. Querying it with 0 works though. Anyways, thanks for all your help!