From: JohnE on 3 Jun 2010 14:12 Have a situation in which the printing (on paper) needs to have recorded the date the printing occurred. This would mainly be a field on the form that says when the report was printed. It won't make a difference how many times the report is printed so long as the date appears in a field. The users use the standard Access 2007 printing methods to print the report so adding a PRINT button on a form or the report is not acceptable. Is is possible to capture A2007's print button? If so, how is it done? Any samples, examples, or links will be helpful. Thanks.... John
From: Mike Painter on 3 Jun 2010 16:10 JohnE wrote: > Have a situation in which the printing (on paper) needs to have > recorded the date the printing occurred. This would mainly be a > field on the form that says when the report was printed. It won't > make a difference how many times the report is printed so long as the > date appears in a field. The users use the standard Access 2007 > printing methods to print the report so adding a PRINT button on a > form or the report is not acceptable. > > Is is possible to capture A2007's print button? If so, how is it > done? Any samples, examples, or links will be helpful. > > Thanks.... John Back in the old days.... I used to pop a message asking if the printing had been a success rather than just mark something printed. It's a rare problem today but I still use it. Something like If MsgBox("Did everything print OK?", vbYesNo, "Continue")= vbYes Then Me.YourFieldName = Date() End If You could also use Now() to save the time and date. You will have to change the way 2007 writes these buttons and make sure it writes code rather than a macro. (Although it can probably be done with a macro.) Click the Access button and select "Access Options" at the bottom right of the screen.
From: JohnE on 3 Jun 2010 22:57 "Mike Painter" wrote: > JohnE wrote: > > Have a situation in which the printing (on paper) needs to have > > recorded the date the printing occurred. This would mainly be a > > field on the form that says when the report was printed. It won't > > make a difference how many times the report is printed so long as the > > date appears in a field. The users use the standard Access 2007 > > printing methods to print the report so adding a PRINT button on a > > form or the report is not acceptable. > > > > Is is possible to capture A2007's print button? If so, how is it > > done? Any samples, examples, or links will be helpful. > > > > Thanks.... John > > Back in the old days.... > > I used to pop a message asking if the printing had been a success rather > than just mark something printed. > It's a rare problem today but I still use it. > > Something like > If MsgBox("Did everything print OK?", vbYesNo, "Continue")= vbYes Then > Me.YourFieldName = Date() > End If > > You could also use Now() to save the time and date. > > You will have to change the way 2007 writes these buttons and make sure it > writes code rather than a macro. (Although it can probably be done with a > macro.) > > Click the Access button and select "Access Options" at the bottom right of > the screen. > > > . > Thanks. The message box trick could work. Since it is the Access printing that is doing the work of printing the Access report, where do you place the msgbox? Also, I looked at the Access Options but what in particular should I be looking for? Thanks again. John
From: Mike Painter on 7 Jun 2010 14:46 JohnE wrote: > "Mike Painter" wrote: > >> JohnE wrote: >>> Have a situation in which the printing (on paper) needs to have >>> recorded the date the printing occurred. This would mainly be a >>> field on the form that says when the report was printed. It won't >>> make a difference how many times the report is printed so long as >>> the date appears in a field. The users use the standard Access 2007 >>> printing methods to print the report so adding a PRINT button on a >>> form or the report is not acceptable. >>> >>> Is is possible to capture A2007's print button? If so, how is it >>> done? Any samples, examples, or links will be helpful. >>> >>> Thanks.... John >> >> Back in the old days.... >> >> I used to pop a message asking if the printing had been a success >> rather than just mark something printed. >> It's a rare problem today but I still use it. >> >> Something like >> If MsgBox("Did everything print OK?", vbYesNo, "Continue")= vbYes >> Then Me.YourFieldName = Date() >> End If >> >> You could also use Now() to save the time and date. >> >> You will have to change the way 2007 writes these buttons and make >> sure it writes code rather than a macro. (Although it can probably >> be done with a macro.) >> >> Click the Access button and select "Access Options" at the bottom >> right of the screen. >> >> >> . >> > > Thanks. The message box trick could work. Since it is the Access > printing that is doing the work of printing the Access report, where > do you place the msgbox? Also, I looked at the Access Options but > what in particular should I be looking for? > Thanks again. > John I thought it could be done globally but can't find where. http://office.microsoft.com/en-us/access/ha012142131033.aspx#convertmacrostovba will guide you through converting and it works on forms. When done you will have something like what is below and the Msgbox would be right under the DoCmd.OpenReport. Private Sub Command105_Click() On Error GoTo Command105_Click_Err DoCmd.OpenReport "Products", acViewPreview, "", "", acNormal Command105_Click_Exit: Exit Sub Command105_Click_Err: MsgBox Error$ Resume Command105_Click_Exit End Sub
|
Pages: 1 Prev: Tracking changes to a form Next: After server upgrade some command buttons do not work? |