Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing Message Label at any time 2

Status
Not open for further replies.

Glad2000

Technical User
Mar 19, 2004
28
0
0
US
Hello every body!!
I have a report with a label containing a long message. It does not change because is permanent. The report is a permit and it is printed many times a day for many different people. Each permit has personal info and the same massage. Now the user wants to be able to change the message at any time let's say, every two month. And after the change, the new message must be default or permanent.
Do you have any clues about how I can allow him to do that? One button? a link? a control? a vba code? a default?
Thanks
 
You could have a form that pop up before you print wiht the message displayed, and this form is linked to a table where it is stored.

If the user does not want to change the message then they just click print, or alter the message, then the message is then used in the print profile.

Does this help...
 
First, change the label on the report to a text-box.
Then create a new table, called tblReportTitle with the fields:

ReportName text(50)
TitleCaption text(200)

and populate it with the appropriate values, e.g.
rptPermit This is a permit

Next create a form for the user so that they can modify the 'TitleCaption'.

Back in the report, change the controlsource of the title text-box in to be

=Dlookup("TitleCaption","tblReportTitle","ReportName='rptName'"

substituting rptName with your report name.

Then the report title will be whatever is contained in 'TitleCaption', and will change automatically once the user updates this table.
HTH
 
Thanks to M8KWR and SarahG.
Let me tell you some more. The owner of the application wants to be able to change the message every one or two months without my help. But he does not want the users have to choose anything, only they enter visitor information and print, because speed is a matter.
I couldn't understand well SarahG suggestion. Could you please explain a little more?
Thanks again.
 
Sarah's solution is very good. It allows you to create different messages for different reports. Where do you not understand? Have you created a table to store the report name and message?

To enhance (and fix a typo in) her solution, I think you could use a control source of:
=Dlookup("TitleCaption","tblReportTitle","ReportName='" & [Name] & "'")

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
Guys & Pals,
What do you do to know much?
Duane, you are right. SarahG’s answer is very good and it worked.
Thanks a lot.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top