I'm just finishing up adding customer invoicing functionality to my Fleet Management app. One bit of functionality a client requested was the ability to know if a customer service order had been invoiced separately by the branch office accounting department. The idea as that the mechanics would only give the customer a service order itemizing the work done, parts used, etc, etc while the accounting department would give the customer the official invoice. And most importantly the accounting department would ensure they got paid.
At first a simple check box was requested but then I realized putting an invoice number would be better. The accounting department would enter the invoice number. Thus not only the accounting department know that the service order had been put on a invoice they would be able to track the paper work better.
I also decided that a purchase order number field would sometimes also be useful.
The accounting department needs to review all the service orders to ensure they all have invoice numbers. And of course they are going to really want to do this for last month and this month. So rather than making them futz around with the date selection boxes and clicking on arrow buttons I decided to give them two command buttons.
The code behind the buttons is:
Me.FromServiceDate = DateSerial(Year(Date), Month(Date) - 1, 1)
Me.ToServiceDate = DateSerial(Year(Date), Month(Date), 1) - 1
and
Me.FromServiceDate = DateSerial(Year(Date), Month(Date), 1)
Me.ToServiceDate = Date
I might rename the command buttons as the names are kind of awkward. Nevertheless I'll publish the screen shot and four lines of code now.
I'll probably never hear from anyone about how useful these two little buttons are. But folks are going to use those somewhat and are, hopefully, be thinking "That's nice."
By the way the various selection criteria are enabled or disabled depending on whether the report has those fields. In this particular report the "Job Site zzzzz" list box isn't used.
Also note that this app allows the users to choose the names of the temporary and permanent location. In this testing database they are "Job Site zzzzz" and "Branch Office".