How to insert an uneditable text message into a text box in ms access 2007 form

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • p4willi
    New Member
    • Jun 2010
    • 22

    #1

    How to insert an uneditable text message into a text box in ms access 2007 form

    Need a solution to utilize space on a MS Access form.
    Currently the form I have developed is in fig 1 in attachment.Here 's part of the code I use currently to display the form:
    Code:
    Me!txt_comments_insdate.ControlSource = "=""Inserted "" & chr(13) & chr(10) & INSERTED_DATE"
    Me!txt_comments_insby.ControlSource = "=""Inserted by "" & chr(13) & chr(10)  & INSERTED_BY"
    Me!txt_comments_notes.ControlSource = "NOTES"
    How can I get it to look like figure 2 or something similar so as to utilize the wasted space taken up by the Inserted_by & Inserted_date fields?

    In fig 2 the Inserted_by & Inserted_date part should now be uneditable and the cursor should begin blinking from just after it for the user to begin entering data.

    If there are better suggestions of doing this - show me and i'll be glad to incorporate.

    Thanks
    Attached Files
  • Stewart Ross
    Recognized Expert Moderator Specialist
    • Feb 2008
    • 2545

    #2
    Hi. Unfortunately the resolution of the image you include is too low to see anything useful (which is a limitation of the Bytes upload size, not anything you've done).

    If you have controls bound to text expressions as you show in your post these are inherently uneditable. If you want to have a textbox which immediately follows these entries with no spaces in between you would need to resize the data entry textbox dynamically (i.e. adjusting its Left property by some amount which reflects the space taken by the non-editable component).

    In my opinion this is likely to be a lot of work for not much actual gain, as proportionally-spaced fonts are not the easiest to work with when working out consequent spacing on other controls.

    I'd suggest that you take a fresh look at the layout of your form and see if you can come up with something which does not require editable text following on immediately from non-editable items.

    -Stewart

    PS: as my response is really saying, it is not possible at all to have uneditable text in the same textbox with editable sequences. You either can edit everything or you can edit nothing; there is no in-between state where you can edit some but not all of the text in a textbox.
    Last edited by Stewart Ross; Oct 24 '10, 07:38 PM. Reason: Added PS

    Comment

    Working...