Adding plain static text to a form

gupster

Registered User.
Local time
Today, 03:22
Joined
Mar 1, 2009
Messages
15
Hi,

problerly an easy item sorry to ask.

I am making an access 2007 database to store my customer fire maintenance certificates.

I have added all my fields to my table name, address, date, ect

I am now making a form the main reason it will look nicer when printed.

Example of the form should look something like this:-

Certificate Number:

Customer Name:

Site Address:


I/we being the competent person(s) responsible (as indicated by my/our signatures below) for the servicing of the fire alarm system, particulars of which are set out below. CERTIFY that the said work for which I/we have been responsible complies to the best of my/our knowledge and belief with the recommendations of Clause 45 of BS 5839-1:2002 inspection of vented batteries/periodic inspection and test/inspection, except for the variations, if any, stated in this certificate.

Signature__________________


The items in red are fine and are got from the table. The item in blue is just static text i want to appear on each form and dont need it linked to the database in any way its just there for when the form is printed it has the legal text and somewhere to sign.

Everytime i add a text box in form design view, add the text then save the above text changes to:-

[I/we being the competent person(s) responsible (as indicated by my/our signatures below) for the servicing of the fire alarm system, particulars of which are set out below].[ CERTIFY that the said work for which I/we have been responsible complies to the be]

Any help please,


Many Thanks,
 
Hi,

I suggest you use a Label rather than a text box. If the content is static there is no problem, but you can add dynamic content to a label should you require.

David
 
thanks just what i needed.

Is there any way to add a line break in a lable?

thanks
 
When you add the text make sure you enclose it in quotes(") USe Chr(10) and Chr(13) for Cr and lf

for example if your box = "This is a line" & chr(10) & Chr(13) & "This is the next line"

This should appear as

This is a line
This is the nex line

Hope this helps
 
thanks but not really sure what the chr(10) and chr(13) bit has to do withit what do they refer to?
 
See my example. Chr(10) inserts a Carriage Return character into your string. Chr(10) inserts a Newlin character into your string. I thought that was what you wanted to do???
 
Sorry i dont not alot about any access programming i am the most newbie you could be.

When i enter into the lable

"This is a line" & chr(10) & Chr(13) & "This is the next line"

on my form view it just shows "This is a line" & chr(10) & Chr(13) & "This is the next line"
 
Hi
I can see the problem which gupster describes: if you put text into a label, even with "" marks, it's faithfully shown on the label. I looked at doing it programatically on form load but I don't think the text property of a label is exposed. So, could it mean reverting to a text box which is more programmable?
 
Using <Shift> and <Enter> together adds the line break in the label.
David
 
Sorry i dont not alot about any access programming i am the most newbie you could be.

When i enter into the lable

"This is a line" & chr(10) & Chr(13) & "This is the next line"

on my form view it just shows "This is a line" & chr(10) & Chr(13) & "This is the next line"
Sorry I thought you were still using a text box.
 
Thanks guys.

One more quick question can I add a "&" access takes it out.

thanks
 
Try "and" - I had the same problem, and that was the way I overcame it!

Sorry,

David
 
Yes, double it up- && will show a '&'

Access interpret single & specially- it converts the next key into a hot key, so if your button was named "&Click Me!", it would display "Click Me!" and you could type C to toggle button like you do with any other Windows button.
 

Users who are viewing this thread

Back
Top Bottom