Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update List Box Automatically

Status
Not open for further replies.

StanJx

Programmer
Jun 2, 2016
29
LK
Hi,

I have a unbound form with 2 list boxes lstReq (reqdate,reqtime,vehiNO,vehistatus) & lstVehi(vehiNO,vehiavail). I need to update lstVehi(vehiavail=false) automatically (Maybe on timer event) according to the data in lstReq according to certain criteria(reqdate=date,reqtime=time,vehiNO=is not null,vehistatus=is null). What would be the best method to get this done? Would appreciate if anyone could help me with the code.
 
I expect you could use the after update event of first list box. I typically write some code that modifies the RowSource property of the second list box based on the selections made in the first list box.

Duane
Hook'D on Access
MS Access MVP
 
I need this to happen with out list box selection.
 
Not sure if I fully understand. But it would help if you could provide the row source of both lists. If I understand you are not filtering the second list based on the first list, but you need to update the underlying table of the second list based on the records in the first list and the current date and time. So if I understand correctly as time goes by as the availability period changes then certain records would be updated from available to not available. A timer event and an update query is likely needed, but you will need to provide more detail.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top