If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Remove print on Report preview
Is it possible to remove the "Print" function for a report in preview mode?
I am printing an invoice and want any print-outs to be done from a button as this adds information such as "date printed" and so on. However, users can preview the report and print that out which means there is no "date printed" added. Can anyone help? Thanks in advance |
#2
|
|||
|
|||
Remove print on Report preview
Can't you put a textbox in the footer of the report that has: =Now() in it.
When the report is printed from the print preview screen, the date and time of printing is stamped on the footer. HappyBlue wrote: Is it possible to remove the "Print" function for a report in preview mode? I am printing an invoice and want any print-outs to be done from a button as this adds information such as "date printed" and so on. However, users can preview the report and print that out which means there is no "date printed" added. Can anyone help? Thanks in advance -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...ports/200702/1 |
#3
|
|||
|
|||
Remove print on Report preview
Thanks for your response.
I need to have a "printed on" date as the date that the report was first printed and so is the date that the invoice is sent to the customer. This is stored in a table and after it's set first time, is not changed on any futute prints. Another option, if it's possible, would be to add the "date printed" data from the normal print button, but I can't see how that can be done either! Help?!?!?! "biganthony via AccessMonster.com" wrote: Can't you put a textbox in the footer of the report that has: =Now() in it. When the report is printed from the print preview screen, the date and time of printing is stamped on the footer. HappyBlue wrote: Is it possible to remove the "Print" function for a report in preview mode? I am printing an invoice and want any print-outs to be done from a button as this adds information such as "date printed" and so on. However, users can preview the report and print that out which means there is no "date printed" added. Can anyone help? Thanks in advance -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...ports/200702/1 |
#4
|
|||
|
|||
Remove print on Report preview
What about creating a label on the report that prints the date from the table
by using dlookup? Such as: lblname.caption = dlookup("[PrintedonDate]","tblTableName") "PrintedonDate" is the name I used for that field you said holds the date. tblTableName is the anme of the table that holds the above field. lblname is the label on the report. HappyBlue wrote: Thanks for your response. I need to have a "printed on" date as the date that the report was first printed and so is the date that the invoice is sent to the customer. This is stored in a table and after it's set first time, is not changed on any futute prints. Another option, if it's possible, would be to add the "date printed" data from the normal print button, but I can't see how that can be done either! Help?!?!?! Can't you put a textbox in the footer of the report that has: =Now() in it. When the report is printed from the print preview screen, the date and time [quoted text clipped - 10 lines] Thanks in advance -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...ports/200703/1 |
#5
|
|||
|
|||
Remove print on Report preview
It won't work using a label control. It could work using a textbox, which
can display the result of the dlookup expression. Rob "biganthony via AccessMonster.com" u31673@uwe wrote in message news:6eac7033f06ed@uwe... What about creating a label on the report that prints the date from the table by using dlookup? Such as: lblname.caption = dlookup("[PrintedonDate]","tblTableName") "PrintedonDate" is the name I used for that field you said holds the date. tblTableName is the anme of the table that holds the above field. lblname is the label on the report. HappyBlue wrote: Thanks for your response. I need to have a "printed on" date as the date that the report was first printed and so is the date that the invoice is sent to the customer. This is stored in a table and after it's set first time, is not changed on any futute prints. Another option, if it's possible, would be to add the "date printed" data from the normal print button, but I can't see how that can be done either! Help?!?!?! Can't you put a textbox in the footer of the report that has: =Now() in it. When the report is printed from the print preview screen, the date and time [quoted text clipped - 10 lines] Thanks in advance -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...ports/200703/1 |
#6
|
|||
|
|||
Remove print on Report preview
This isn't what I'm after, but if I tell you what I've got, you'll understand
why I have got three buttons on a form, one for "view", one for "e-mail" and one for "print". Thhe first time that the report (invoice) is printed from the "print" button, a field is written that creates a "Printed on" date. This is then the Invoice date that must remain fixed at the first date as it is an invoice date. The creation of this date happens when my "print" button is pressed. On subsequent prints, this date is not changed. On the report I show this Invoice date (which is essentailly what has been suggested below) as well as the current date if it's different (on subsequent prints). If the invoice is emailed, I have a similar process. The problem is that uers are opening the invoice in "View" and then printing from the preview. When they do this, there is no way I can see to fire an event that will create the invoice date, so they are sending invoices without an initial invoice date. I want to be ableto capture this problem, or stop it from being able to happen. My initial thought was to simply (if only!) disable the default "Print" button from the report preview, but if there are other options, I'll try those Thanks for your continued help. "Rob Parker" wrote: It won't work using a label control. It could work using a textbox, which can display the result of the dlookup expression. Rob "biganthony via AccessMonster.com" u31673@uwe wrote in message news:6eac7033f06ed@uwe... What about creating a label on the report that prints the date from the table by using dlookup? Such as: lblname.caption = dlookup("[PrintedonDate]","tblTableName") "PrintedonDate" is the name I used for that field you said holds the date. tblTableName is the anme of the table that holds the above field. lblname is the label on the report. |
#7
|
|||
|
|||
Remove print on Report preview
HappyBlue wrote:
This isn't what I'm after, but if I tell you what I've got, you'll understand why I have got three buttons on a form, one for "view", one for "e-mail" and one for "print". Thhe first time that the report (invoice) is printed from the "print" button, a field is written that creates a "Printed on" date. This is then the Invoice date that must remain fixed at the first date as it is an invoice date. The creation of this date happens when my "print" button is pressed. On subsequent prints, this date is not changed. On the report I show this Invoice date (which is essentailly what has been suggested below) as well as the current date if it's different (on subsequent prints). If the invoice is emailed, I have a similar process. The problem is that uers are opening the invoice in "View" and then printing from the preview. When they do this, there is no way I can see to fire an event that will create the invoice date, so they are sending invoices without an initial invoice date. I want to be ableto capture this problem, or stop it from being able to happen. My initial thought was to simply (if only!) disable the default "Print" button from the report preview, but if there are other options, I'll try those Thanks for your continued help. In most serious apps you remove access to all of the built in menus and toolbars and build your own and decide where they are displayed. Going that route you just make sure that the menus and toolbars displayed when a report is in preview mode do not include any options to print. You would also need to use the AutoKeys macro to re-assign the Ctl-P combination to some other action other than its normal "Print Options" action. -- Rick Brandt, Microsoft Access MVP Email (as appropriate) to... RBrandt at Hunter dot com |
#8
|
|||
|
|||
Remove print on Report preview
Rob,
Why won't it work? I create a label, press the spacebar to create a couple of spaces and then in the report properties, use DLOOKUP to read the values from the field and place it in the caption of the label. The caption displays correctly in any report I have used. Is this programmatically incorrect? I'm not a programmer, just someone who writes little databases for friends. Anthony Rob Parker wrote: It won't work using a label control. It could work using a textbox, which can display the result of the dlookup expression. Rob What about creating a label on the report that prints the date from the table [quoted text clipped - 27 lines] Thanks in advance -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...ports/200703/1 |
#9
|
|||
|
|||
Remove print on Report preview
Hi Anthony,
Seems that this is a side-thread to the OP's question, but nevertheless ... I don't understand exactly what you mean by "in the report properties, use DLOOKUP to read the values from the field and place it in the caption of the label". Are you doing this in code? If so, then yes, you can use a label control and assign the dlookup result to the caption - something like: MyLabelControl.Caption = dLookup("Field","Domain","Criteria") probably in the report's Open event, or perhaps better, in the Format event of the appropriate section of the report. However, that's not exactly what you posted - you said to put the dlookup as the label's caption. I was simply pointing out that a label control, with a dlookup statement entered directly into its caption entry on the property sheet, will not display the result of the dlookup - it will display the dlookup statement itself. On the other hand, if you put the dlookup into a textbox control (preceded with an = sign) it will display the result of the dlookup directly. HTH, Rob "biganthony via AccessMonster.com" u31673@uwe wrote in message news:6eb337d4290f6@uwe... Rob, Why won't it work? I create a label, press the spacebar to create a couple of spaces and then in the report properties, use DLOOKUP to read the values from the field and place it in the caption of the label. The caption displays correctly in any report I have used. Is this programmatically incorrect? I'm not a programmer, just someone who writes little databases for friends. Anthony Rob Parker wrote: It won't work using a label control. It could work using a textbox, which can display the result of the dlookup expression. Rob What about creating a label on the report that prints the date from the table [quoted text clipped - 27 lines] Thanks in advance -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...ports/200703/1 |
#10
|
|||
|
|||
Remove print on Report preview
Hi Rob,
Sorry my original post was unclear - I was referring to entering the dlookup command in code in the Report's Open or Format event as you suggest and can see how what I wrote could be interpreted the other way (which is not what I wanted!). Sorry - have realised that I used the word "report properties" and not "Report Events" such as onOpen. Anthony Rob Parker wrote: Hi Anthony, Seems that this is a side-thread to the OP's question, but nevertheless ... I don't understand exactly what you mean by "in the report properties, use DLOOKUP to read the values from the field and place it in the caption of the label". Are you doing this in code? If so, then yes, you can use a label control and assign the dlookup result to the caption - something like: MyLabelControl.Caption = dLookup("Field","Domain","Criteria") probably in the report's Open event, or perhaps better, in the Format event of the appropriate section of the report. However, that's not exactly what you posted - you said to put the dlookup as the label's caption. I was simply pointing out that a label control, with a dlookup statement entered directly into its caption entry on the property sheet, will not display the result of the dlookup - it will display the dlookup statement itself. On the other hand, if you put the dlookup into a textbox control (preceded with an = sign) it will display the result of the dlookup directly. HTH, Rob Rob, [quoted text clipped - 21 lines] Thanks in advance -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...ports/200703/1 |
Thread Tools | |
Display Modes | |
|
|