Combo box on subform not filling completely

J

John A.

Hi all,
I have a combo box on a subform whose recordsource needs to change from
actions taken either on the parent form or within the subform itself. I
call a "reset combos" routine in the subform module from either parent or
sub to fill in the recordsource and requery the combo box.

When done from within the subform, I get all records in the combo box, in
this case around 40 items of 2 or 3 columns. When done from the parent form
I get only the first 18 or 20, and scrolling to the bottom doesn't show any
more. If I then click F9 to requery in the combo box itself, I get all
records.

I've tried all the obvious (to me, at least) ideas - anyone have any
suggestions?

Thanks in advance,
John
 
M

Marshall Barton

John said:
I have a combo box on a subform whose recordsource needs to change from
actions taken either on the parent form or within the subform itself. I
call a "reset combos" routine in the subform module from either parent or
sub to fill in the recordsource and requery the combo box.

When done from within the subform, I get all records in the combo box, in
this case around 40 items of 2 or 3 columns. When done from the parent form
I get only the first 18 or 20, and scrolling to the bottom doesn't show any
more. If I then click F9 to requery in the combo box itself, I get all
records.


Sounds like the combo box is sloe in loading its records.
After the Requery, try forcing it to read all the records:

varDummy = Me.thecombobox.ListCount
 
J

John A.

Thanks for the idea Marsh - varDummy gets the right number, but there are
still only about half displayed in the combo box
John
 
J

John A.

Further update Marsh:

When I put a .requery and then a .listcount on the Enter event of the combo
box in the subform, I get all records.

Thanks for steering me the right direction!

John
 

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