| re: warning of an approaching date
"David B" <david@marleycotenospam.fsnet.co.uk> wrote in
news:bo32vp$sq0$1@newsg4.svr.pol.co.uk:
[color=blue]
> I have a table containing a number of dates when action lists
> need to be printed.
> When the start form opens I want the system to check of any
> datediff is between 0 and -5 and if yes open the form which
> allows the user to select and print the list.
> Also if the list was printed on day -4 I want to cancel the
> routine on days - 3 to 0
> Any thoughts on how to do this ?[/color]
Second answer first.
Add a yes/no field to the actiondates table to mark its been
printed.
That done, build a query that returns the records that fall between
now and five days in the future, and AlreadyPrinted = no. Open the
query as a recordset from vba in your start form's Open Event and
check if the recordcount is > 0. If it is, open the form. Better
yet, run the report directly. set AlreadyPrinted to yes. Close the
recordset.
Bob Q
[color=blue]
> TIA
> David B
> Hexham UK
>
>[/color] |