Hi,
I've one masc in access like a dashboard, to view all my process job.
The db is AS400.


much user work with this dashboard and I check something to valuate if is necessary to play a query or not.
Ex: today morning, I want to know how much item, yesterday was delivered.
Into my dashboard I select the date and I play the button associated at one macro (Mupd)

Mupd: openquery q_clearItemOut (delete * from T_ItemOut)
openquery q_updItemOut (Insert Into T_ItemOut select * from AS4000 where DateJob = [form]![homepage]![lbDatesearch])
Open report R_ItemOut (select * from T_ItemOut)

Now
Another gay want to know the some information (yesterday), open dashboard--> select data to search and play start (some macro) the query start another time for the same date.!!!!!!!!!!!!

It's possible to create one control like: iif ((select min(DateJob) from T_ItemOut)<>[form]![homepage]![lbDatesearch]; Mupd else Mupd1)

Into generate macro I've a column to inset the condition but query string is not able.

Mupd1= Open report R_ItemOut (select * from T_ItemOut)

Some ideas???
Thank in advance.
Fabrizio