Puzzled!
I have a list box, and I want code to behave in a particular way according to whether the listbox is empty (no rows displayed) or not.
I have written ...
If MyList.ListCoun t = 0 then do something, else do something else
This is refusing to work properly under some circumstances, as follows ...
(I've put in a message box to tell me what the code thinks the list count is)
If this is a new record, the code thinks the ListCount is 1, even though the list is empty on the form (and should be, as it has no row source until the record is saved).
If the user is editing an existing record, and the list box is displayed as empty, the code knows it is empty and tells me the ListCount is 0.
This seems to me to be very bizarre! Can anyone explain?
(By the way, what has happened to the Help system in Access 2007? MS seem to have changed it for me without consultation and it's gone from being annoying but reasonably helpful to totally unhelpful overnight!!)
I have a list box, and I want code to behave in a particular way according to whether the listbox is empty (no rows displayed) or not.
I have written ...
If MyList.ListCoun t = 0 then do something, else do something else
This is refusing to work properly under some circumstances, as follows ...
(I've put in a message box to tell me what the code thinks the list count is)
If this is a new record, the code thinks the ListCount is 1, even though the list is empty on the form (and should be, as it has no row source until the record is saved).
If the user is editing an existing record, and the list box is displayed as empty, the code knows it is empty and tells me the ListCount is 0.
This seems to me to be very bizarre! Can anyone explain?
(By the way, what has happened to the Help system in Access 2007? MS seem to have changed it for me without consultation and it's gone from being annoying but reasonably helpful to totally unhelpful overnight!!)
Comment