Thanks, but without the data being enabled in the text box properies, the scroll bar is not displayed. If I enable the data, then all of the text in the text box is highlighted and makes for an ugly display.
Does anyone know of a way to move the cursor to the begining of the text, desecting the text?
Thought I had it that time but it's back to the drawing board. Just isn't working.
Here's what I'm doing, when I click a button I run the following code.
'1) Open the form, hidden
DoCmd.OpenForm "frmMiscText", acNormal, "", "", acFormReadOnly, acHidden
'2) Populate the field
Forms("frmMiscText")("Text0") = DLookup("[txt_text]", "tblMiscText", "[txt_description] = 'leave_category'")
'3) Set the caption for the dialog
Forms("frmMiscText").Caption = DLookup("[txt_caption]", "tblMiscText", "[txt_description] = 'leave_category'")
'4) Make the form visible
Forms("frmMiscText").Visible = True
Text0 has the following properties set
Enabled = Yes
Locked = Yes
Scroll Bars = Vertical
I've set database behaviour entering field
Tools--Options--Keyboard--Behaviour entering field = Go to start of field
And yet the text in Text0 is still highlighted when I open the form.
I'm sure that it's probably a property that I have set so I'll just keep plugging away.
Play around with the TabStop=No property. You might also make an extra textbox (very very tiny, almost invisible) and give that one TabStop=Yes.
Then your cursor will be on the tiny field.
You might also base the info on a non-updatable query. Using SQL-server it is easily done by omitting the keyspecification in the table.
Other solutiuon might be to set the Allow-properties.
note: setting the SelLength to 0 also means that I don't have to set Behaviour entering field to Go to start of field, which can be a pain when working with tables.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.