Results 1 to 6 of 6
  1. #1
    Karen H is offline Novice
    Windows XP Access 2003
    Join Date
    Jan 2011
    Posts
    21

    Question Grow text box on form with focus

    I have a subform set up in continuous forms.

    I usually have only a few words to put in a "notes" field. But sometimes, I need to enter an explanation, and then look back and review it later.

    I would like to have the text box expand to view all the text when I click on the field (got focus?) and then return to it's original size when I leave the field.

    If I make the height on the text box bigger, it takes up too much real estate on my form. I would like it to pop open or zoom and then return to normal.

    Is this possible?

  2. #2
    Karen H is offline Novice
    Windows XP Access 2003
    Join Date
    Jan 2011
    Posts
    21
    Never mind, I figured out a way to get what I needed.

    The subform is a tabbed subform. There were 2 tabs, switching between 2 different forms and sets of data.

    I made a third subform and called it subform expanded and increased the height of the "notes" field. Now I can just switch to this tab when I need to see more details.

  3. #3
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Just to throw out an alternative, this:

    DoCmd.RunCommand acCmdZoomBox

    will open the field in a zoom box. I use that in the double-click event of a textbox for the user to open it up.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  4. #4
    Karen H is offline Novice
    Windows XP Access 2003
    Join Date
    Jan 2011
    Posts
    21

    Talking

    Oh, too cool.

    I am not sure what I was doing wrong but when I entered

    DoCmd.RunCommand acCmdZoomBox

    on the On dbl click line of the event I get an error message about there not being a macro with that name.

    I know NOTHING about macros and even less about code. I am self-taught, trial and error. I can usually get what I want to happen, but it might not be too elegant.

    After a bit of trial & error I made a Macro called DoCmd the action line has runCommand and the Command has ZoomBox

    I am not sure why I had to tinker with the line you showed me unless it should have been done some other way. I would like to know wha I was doing wrong, for next time.

    I will use this macro in so many other places I am needing to see more info but had enough room to but a big box on the form.

  5. #5
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    What I posted was VBA code, so you would have entered it in the VBA editor, not in the properties box:

    http://www.baldyweb.com/FirstVBA.htm
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  6. #6
    Karen H is offline Novice
    Windows XP Access 2003
    Join Date
    Jan 2011
    Posts
    21
    So much to learn, so little time!

    Thanks again.

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

Similar Threads

  1. Any change of focus on form Event?
    By trb5016 in forum Forms
    Replies: 1
    Last Post: 02-11-2011, 08:25 PM
  2. Replies: 6
    Last Post: 11-16-2010, 02:38 PM
  3. Can Grow Property
    By chum in forum Reports
    Replies: 3
    Last Post: 01-25-2010, 11:10 AM
  4. Setting Focus on a Form
    By MFeightner in forum Forms
    Replies: 1
    Last Post: 07-30-2009, 07:49 AM
  5. Can Grow Property
    By MFeightner in forum Reports
    Replies: 0
    Last Post: 06-24-2009, 11:50 AM

Tags for this Thread

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