List won't refresh value when requeried

dtburdick

Registered User.
Local time
Today, 11:20
Joined
Oct 29, 2002
Messages
33
I have a list box I'm requerying using code but the value doesn't change.

"qryDelete" deletes the current row they have selected.

str = Me.lstControl.Value
DoCmd.OpenQuery "qryDelete"
Me.lstControl.Requery
Me.lstControl.Selected(0) = True
str = Me.lstControl.Value

The value of str doesn't change after I requery (ergo it contains the ID of the record I deleted.

Thanks for any help.
 
This is more basic than that.

When I set the 'selected' attribute of the list box, the 'value' attribute remains the same. How do I get the bound value of the control?
 
DT,

Try working with the itemdata property...

Code:
str = Me.lstControl.Itemdata(0)

Regards,
Tim
 

Users who are viewing this thread

Back
Top Bottom