Results 1 to 7 of 7
  1. #1
    jcaswell is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2012
    Posts
    5

    Full screen text editing in Forms with Access 2007

    Is there any way (probably through a key combi9nation) that I can invoke a larger editing window to edit memo text fields in an Access form? I know that, to get the full rich text capability I need to set theText Format property appropriately, but I feel sure that there must be a way to expand the editing box to give me a bigger editing window.



    Can anyone help me with this?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    The only thing I know of is to open a custom unbound form and then with code save the entered text to the field of record on main form.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Missinglinq's Avatar
    Missinglinq is online now VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    You could use the Zoombox Command, but as with Messageboxes, you really have no control over the size or the position of the box when it pops up.

    A fairly simple way would be to 'roll your own' Zoombox with a secondary Memo Field Control.

    1. Place a large Textbox (call it Zoombox) on your Form.
    2. Size the Control and Position it as you want, being sure to cover the original Memo Field Control with it.
    3. Assign it the same Control Source as the Memo Field you're expanding (yes, two Controls on one Form can have the same Control Source)
    4. Set the Visibility for this Zoombox to 'No,' by Default, in the Properties Pane.
    5. When you want to 'expand' the Memo Field Control, Re-set the Visibility for this Zoombox to 'Yes' by Double-Clicking the original Memo Field Control.


    Now, use these code bits, substituting (in the 2nd and 3rd code bits) the actual name of your original Memo Control to be expanded for YourTextBox.

    Code:
    Private Sub Form_Load()
     'Make the Textbox Invisible on loading the Form    
     Zoombox.Visible = False
    End Sub


    Code:
    Private Sub YourTextBox_DblClick(Cancel As Integer)
     'When you double click the field, make the ZoomBox
     'visible and move the cursor to the beginning to
     'deselect the text  
     Zoombox.Visible = True
     Zoombox.SetFocus    
     Zoombox.SelStart = 0
    End Sub

    Code:
    Private Sub Zoombox_DblClick(Cancel As Integer)
     'Double click the ZoomBox to close it and
     'return to your original field
     Me.YourTextBox.SetFocus
     Zoombox.Visible = False
    End Sub


    So, to summarize, you Double-Click the Original Memo Field Control to 'expand' it, making Visible the Secondary Memo Field Control, enter data, then Double-Click the Secondary Memo Field Control to close it, leaving the Original Memo Field Control showing, once again.

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  4. #4
    jcaswell is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2012
    Posts
    5
    Thanks, Linq - very clever. The only thing I changerd was to add a 'YourTextBox.SelStart=0' at the end of the third piece of code to put the cursor to the start of the main field when the Zoombox ix closed.

    I have one further question for anyone - having got to the editing stage, and made the table field and form fileds memo rich text, I can do some reasonable editing. However, I need to use Ctrl/Enter to get a new line in the field - Enter merely moves the cursor to the next field or button. Is there a way I can disable that feature (that is Enter moving to the next field or button) while in that field on the form, and make it give me a new line? Only for that field.

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Yes, I like Linq's idea too.

    Try setting the textbox EnterKeyBehavior property to NewLineInField.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  6. #6
    jcaswell is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2012
    Posts
    5
    Thank you to both of you - I should have looked closer to the property fields

  7. #7
    Missinglinq's Avatar
    Missinglinq is online now VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    Glad we could help!

    Good luck with your project!

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 04-06-2019, 12:59 PM
  2. Replies: 1
    Last Post: 08-09-2012, 08:56 PM
  3. Replies: 1
    Last Post: 10-04-2011, 02:39 PM
  4. Replies: 3
    Last Post: 07-18-2011, 09:24 AM
  5. Replies: 11
    Last Post: 06-05-2011, 09:51 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums