I need the button to print any records that have not already been printed, even if this means you click on the button at 10am in the morning and then you might want to click on it at 12am the same day - the button just needs to pick up only the reports that haven't been printed before and print those.
I'm quite new to Access, so don't know how to do what you suggest anyway.
any more ideas?
thanks
i found this code
DoCmd.OpenReport "Reportname", acViewNormal, WhereCondition := "Printed=False And RecordDate=#" & Date() & "#" ' force it to print on the printer
DoCmd.SetWarnings False
DoCmd.RunSQL "Update table set printed=true where Printed=false and RecordDate=#" & Date() & "#"
DoCmd.SetWarnings True
but no solution
any help plmease
I'm quite new to Access, so don't know how to do what you suggest anyway.
any more ideas?
thanks
i found this code
DoCmd.OpenReport "Reportname", acViewNormal, WhereCondition := "Printed=False And RecordDate=#" & Date() & "#" ' force it to print on the printer
DoCmd.SetWarnings False
DoCmd.RunSQL "Update table set printed=true where Printed=false and RecordDate=#" & Date() & "#"
DoCmd.SetWarnings True
but no solution
any help plmease