Text box with vertical scroll bar

thinair421

Registered User.
Local time
Today, 12:49
Joined
Jun 22, 2010
Messages
34
Hi,

I would like to do something along the lines of this:

1) Have a button on my current form that either opens a specific word document (in word) or opens a form that displays a scrollable text box (read only) that I have filled with text.

Any idea on how to do this?
 
Hi,

I would like to do something along the lines of this:

1) Have a button on my current form that either opens a specific word document (in word)
2) Opens a form that displays a scrollable text box (read only) that I have filled with text.

Any idea on how to do this?

1) Application.FollowHyperlink "X:\SomeWhere\YourFile.doc", , True

2) Text boxes do not have a scroll bar property. You can set the Locked property of a text box to Yes do prevent a user from changing the data in the text box.
 
So, ghudson I tried adding that line in under the OnClick code builder (for the button) and it just took me to the file in windows explorer. I would like for the button to open the file up in MS Word if possible. If that isn't possible, I would like to make the button to open up another MS Access form, which just has my block of text (preferably in a scrollable box [vertical]).

Dont know if this clarifies things at all, but here is what I am attempting to do. On the main form (that I want the button to be on) there are several fields to fill in. These fields are filled in with data collected from detailed tests. So the purpose behind putting this button in is to more or less take the user to a help document (either open the actual MS Word document in Word....or open up to an MS Access form with the word document embedded...or open to another MS Access form that will have a read only "text box" of some sort containing the text that the user can scroll down thru).

OK so sorry for rambling, just tryin to be clear. Thanks so much for everything.
 
The Application.FollowHyperlink function will open the doc file in Word. Ensure you have correctly coded the string where the file is located starting with the path to the file and the file name and enclosed in double quotes... "X:\Path\YourFile.doc"


Code:
Application.FollowHyperlink "X:\Path\YourFile.doc", , True
 
If the help file data is not very large or needing formatting you could put the help data into a message box instead. Less work for the user to read and close a simple text box on screen instead of having to open a file to read and close. IMO

Below is the code I have in a message box to display some instructions...

Code:
Private Sub btnHelp_Click()
On Error GoTo Err_btnHelp_Click

    Me.txtHidden.SetFocus
    
    Dim sMessage As String

    sMessage = Chr(222) & "  Click the Add Record button to create a new record.  Old records should not be modified." & vbCrLf
    sMessage = sMessage & Chr(222) & "  Click the Save Record button to save the changes to the current record." & vbCrLf
    sMessage = sMessage & Chr(222) & "  Click the Undo button to reverse any recent changes made to the current record." & vbCrLf
    sMessage = sMessage & Chr(222) & "  Clicking the Undo button will not reverse any changes after a record has been saved." & vbCrLf
    sMessage = sMessage & Chr(222) & "  You must save a new record or undo any recent changes before you can navigate from the current record." & vbCrLf
    sMessage = sMessage & Chr(222) & "  Please contact John Doe if you have any questions concerning the database." & vbCrLf
    sMessage = sMessage & "" & vbCrLf & vbLf

    MsgBox sMessage, vbInformation, "User Instructions"

Exit_btnHelp_Click:
    Exit Sub

Err_btnHelp_Click:
    MsgBox Err.Number & " - " & Err.Description, vbCritical, "btnHelp_Click()"
    Resume Exit_btnHelp_Click

End Sub
 
Alrighty, I copied the file location all the way up to the folder it was in, but didnt specify the actual filename. Thank you so much.

So if I did want to have the button open a seperate access form with just a box of read only scrollable text (roughly 5 pages worth in Word), would that be possible?
 
I made my own help screen that was activated by righ clicking on the label of a control box. I brought up the sample form with the correct entry taken from a table based on the PK of the control helpID
 

Attachments

  • HELP.JPG
    HELP.JPG
    21.1 KB · Views: 283
This is what im essentially trying to do...

Please see attached picture (fixed textbox with scroller bar is all i want). Thanks
 

Attachments

  • eula.png
    eula.png
    95.1 KB · Views: 361
Last edited:
Then you want to create a form and use a memo field to display your data since a text field is limited to 255 characters.
 
Sorry, i'm really new to access. How would I go about doing that? In form design view, should I insert a text box, a label, or some other object? What would be the source of the text? Again, sorry for my lack of access skill. Thanks
 
So heres a screenshot of what I've got so far...its exactly what I want layout wise, I just cannot figure out how to get readonly text into the textbox. Copying the word file into this box doesnt work because it says my string of characters is too long. Im assuming that the control source of the textbox has something to do with this? Thanks
 

Attachments

  • form.jpg
    form.jpg
    63.6 KB · Views: 279
to get anything in a text box, you need code that says


mytextbox = somevariable

mytextbox is the name of the text box
somevariable is a programme value, which I presume you have,

------------
to make the text box read only, set these properties

enabled = true
locked= true
 

Users who are viewing this thread

Back
Top Bottom