[AccessD] Refreshing values on a form

Gustav Brock Gustav at cactus.dk
Tue Jan 17 12:33:15 CST 2006


Hi Arthur the Mighty

That should work. If I requery a listbox and assign it a value:

  Forms(0).lstSome.Value = 2200

it rolls at once to that line. 
If I browse away without selecting another line and then requery, it rolls to the line with the assigned value.

So something else must be going on ...

/gustav

>>> artful at rogers.com 17-01-2006 18:30 >>>
I have a form in an inherited app that posits two ways to search: a) you can
select from several listboxes, each cascading to the child until finally you
end up with an invoice number; b) if you know the invoice number, you can
select this option and go directly to the invoice.
I enclosed the options in an option frame whose code disables the choice you
didn't make and enables the choice you did make. (i.e. you can then enter
the values for a) or b)). 
This all works, but what I want to happen is that if you choose search
method b) then the listboxes in choice a) all move to the corresponding
locations within the listbox. I am assigning the values correctly, according
to debug.print anyway, but the listboxes are not rotating to the
corresponding items. In my code I assign the values obtained via selection
b) and then requery the listboxes but they do not move to the selected item.
I want the current value to appear topmost on the listbox. What am I doing
wrong or not doing?
TIA,
Arthur,
Son of Uther Pendragon,
Defeater of the Saxons,
Lord Over Alllll England, and
King of the Dorks





More information about the AccessD mailing list