E
el zorro
I have a List Box on a form that I want to be refreshed
or requeried when the user clicks a check box. Basically,
there's a list of records. The user selects a record from
the list Box. Information from the record is displayed on
the form for that record. The user check a check box
field for that record. Then the record is supposed to be
taken off the list.
I have tried two approaches inthe Afeter Update event for
the check box. One works, and the other doesnt:
Dim ctList As ListBox
'Add or remove app't from list based on checkbox
'This Requery doesn't work. Why?
'Set ctList = Me!List6
'ctList.Requery
'Refresh-- This works
DoCmd.DoMenuItem acFormBar, acRecordsMenu, 5, ,
acMenuVer70
I can't get the requery method to work (it's commented
out now), but the DoCmd refresh code DOES work.
So, I have 2 questions. (1) Why doesn't the Requery
method (which is now commented out) work? (2) If I could
get it to work, which code would be preferable-- to
requery the list or do the refresh?
or requeried when the user clicks a check box. Basically,
there's a list of records. The user selects a record from
the list Box. Information from the record is displayed on
the form for that record. The user check a check box
field for that record. Then the record is supposed to be
taken off the list.
I have tried two approaches inthe Afeter Update event for
the check box. One works, and the other doesnt:
Dim ctList As ListBox
'Add or remove app't from list based on checkbox
'This Requery doesn't work. Why?
'Set ctList = Me!List6
'ctList.Requery
'Refresh-- This works
DoCmd.DoMenuItem acFormBar, acRecordsMenu, 5, ,
acMenuVer70
I can't get the requery method to work (it's commented
out now), but the DoCmd refresh code DOES work.
So, I have 2 questions. (1) Why doesn't the Requery
method (which is now commented out) work? (2) If I could
get it to work, which code would be preferable-- to
requery the list or do the refresh?