Update List Box Automatically (1 Viewer)

StanJx

Registered User.
Local time
Today, 10:40
Joined
Apr 5, 2012
Messages
21
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.
 

Ranman256

Well-known member
Local time
Today, 01:10
Joined
Apr 9, 2015
Messages
4,339
When user changes the 1 list, run an update query to change status of vehicle.
Then just refresh th other list....
Code:
Sub lst1_dblClick()
    'Update data
Docmd.setwarnings false
Docmd.openquery "quUpdVehData"
    'Refresh other list
LstBox2.requery
End sub
 

Users who are viewing this thread

Top Bottom