DAO Recordset FINDNEXT Timer Help

  • Thread starter Thread starter Brandon Johnson
  • Start date Start date
B

Brandon Johnson

I'm having a little issue. Kind of seems minor. I have a table,
"tblLoginPWD", that holds yes/no in one column. what im trying to do is
be able to go through the whole column and find ALL the ones that are
checked and display them in a listbox. I would also like to put that in
a timer so that fires every 30 sec or so. Im kind of lost of how to go
about doing all that. if anyone has any input please let me know.
thankyou so much.

Set User = CurrentDb.OpenRecordset("tblLoginPWD", dbOpenDynaset)
UserCri = "[login_status] = yes"
For i = 0 To User.EOF
User.FindNext UserCri
lstActivity.AddItem (User!login_Name)
Next
 
Create a query with the field(s) you want to show in your list box that is
filtered on your yes/no field being true.
Use this as the row source of your list box.

In the OnTimer event of the form, requery the listbox.
 
The timer is a form event. It uses the TimerInterval property.
See Timer Event and TimerInterval Property in VBA Help for details. The
basic concept is that in the Load event of the form, you set the
TimerInterval property so it fires at the interval you want. Then you put the
code in the Timer Event to tell it what do to do when the timer fires.
 
Back
Top