How to indicate when text truncated?

MatMac

Access Developer
Local time
Today, 18:59
Joined
Nov 6, 2003
Messages
140
If I have a text box which is smaller that the text it displays, any idea how to indicate that what the user is seeing is truncated, e.g. by putting '...' at the end?

Many thanks

Mat
 
should probably truncate it yourself. find out how many characters will fit and only supply that number of characters to the user, appending '...' to the end. (pick a low number, just in case the characters are large, unless you use a fixed-width font).
 
This is somewhat confusing. Access does not "truncate" text because the textbox that holds it is "too small." It'll convert numeric data to scientific notation if it cannot display a full number, but won't do anything to text, at least not in v2000-2003. Perhaps a more detailed explanation of your problem would help us help you.
 
you can display a scroll bar in the text box, to assist you in seeing the data, and I think missinglinq himself pointed out to me that shift-F2 opens a larger display box for the relevant field.

you could have a lable that becomes visible if the no of chars is greater than a given number

in the current event, put biglabel.visible = len(nz([checkfield])>30 - but it will be a bit hit and miss, as most fonts are proportional spaced.
 
Thanks Wazz - that's a good idea. As Gemma-The-Husky mentioned, though, the fact that fonts are proportional means that the length of my 'truncated' strings would be irregular.

Missinglinq - thanks - and appologies for not being clear. I did not mean 'truncated' in the formal sense. Rather, I just want to 'see' something like this when I look at my form...

3.1 Does the proposed project make excepti...
3.2 Are there any reasons why the project s...
3.3 What are the main requirements for the ...

The full text strings would still exist, but the three dots indicate that the user cannot see the full string.

Gemma-The-Husky - In my database, I am using a continuous form displaying the above quetions next to a drop-down list of answers. The question field is locked to I can't use SHIFT-F2 to zoom. Same for scroll bars.

This form is a summary sheet for the user to review and if neccessary change answers. The full question text is available in another form. For the above I simply want to display a short summary, and I thought the '...' appended to questions that could not be fully displayed would look tidier.
 
Thanks Wazz - that's a good idea. As Gemma-The-Husky mentioned, though, the fact that fonts are proportional means that the length of my 'truncated' strings would be irregular.
that's what i was saying. you could use a fixed-width font or experiment with your current font. if it's a proportional font, just low-ball the number of characters to display (experiment a bit). i've done this on a form before and it works fine.

use a query for the form.
add your field but change it from
[yourfield]
to
myfield: left([yourfield],10) & "..."
 
The question field is locked to I can't use SHIFT-F2 to zoom.
Just for the record, while you cannot use <Shift> + <F2> to invoke the Zoom feathure with a locked textbox, you can use the MouseMove event to do so:
Code:
Private Sub YourField_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  YourField.SetFocus
  DoCmd.RunCommand acCmdZoomBox
End Sub
 
if you want a field locked - you can still have enabled = true

then you can enter the field but not edit it - presumably shift-F2 would then work ok.
 

Users who are viewing this thread

Back
Top Bottom