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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MsgBox with a Scroll Bar? 2

Status
Not open for further replies.

Page410

Technical User
Mar 9, 2001
106
0
0
US
I was wondering if anyone knows how I can get a vertical scroll bar on a text field where the data is locked and not enabled?

Basically, I'm creating a msgbox with a scoll bar.

Any help is greatly appreciated.

Thanks,
Mike
 
I am using Access 2000, and I can do this through the normal properties of the control. i.e.

Right Click Text Box/Select Properties/Select "All" Tab/Change Option called "Scroll Bars"

I hope this helps.
 
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?
 
How about this....

Enabled = Yes
Locked = Yes
Scroll Bars = Vertical
Tools--Options--Keyboard--Behaviour entering field = Go to start of field



Randy
 
Tools--Options--Keyboard--Behaviour entering field = Go to start of field

That was it thanks Randy, I knew that it was doable. I just forgot about DB options.

Thanks again,
Mike
 
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.




 
Have you tried something like this ?
Forms("frmMiscText")("Text0").SelLength = 0

Hope This Help, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884
 
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.

Success, Hans
 
PH, That worked great.

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.

Thank you all for your assistance.

Mike
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top