Results 1 to 12 of 12
  1. #1
    Blings's Avatar
    Blings is offline Competent Performer
    Windows 10 Office 365
    Join Date
    May 2020
    Location
    London, UK
    Posts
    125

    Can a text box grow within a form?

    Evening all,



    Can a text box within a form with a large amount of text automatically expand? I have changed the default value of "No" to "Yes" under the 'Can Grow' format, however, it still doesn't grow? (There is another sentence below the first row record.)

    Click image for larger version. 

Name:	FormTextbox.PNG 
Views:	35 
Size:	13.9 KB 
ID:	45796
    Last edited by Blings; 07-20-2021 at 01:29 AM. Reason: Grammar clean-up

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    To me that's one of those worthless properties. It only works when you print a form, not view it. Most of never print forms, so...worthless.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    In terms of using the can grow/shrink properties of the form they only apply when the form is printed.

    You can do it with vba for a single form, not a continuous form but on my phone so no access to code. Google ‘Stephen lebans’ who has done a lot of work around visual presentation including resizing controls based on content

  4. #4
    Minty is offline VIP
    Windows 10 Office 365
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,001
    If you don't need to edit the data in the form then you can display a report in a form and that can grow and shrink in a continuous report style.
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  5. #5
    Blings's Avatar
    Blings is offline Competent Performer
    Windows 10 Office 365
    Join Date
    May 2020
    Location
    London, UK
    Posts
    125
    Thanks. I'll resize the text box in the mean time to be double the size, however, I don't really like this solution but it'll have to do for now. I've found this article by 'Stephen Lebans', I'll need to adjust my Access operating bit down to 32-Bit in order to take a look.

  6. #6
    Blings's Avatar
    Blings is offline Competent Performer
    Windows 10 Office 365
    Join Date
    May 2020
    Location
    London, UK
    Posts
    125
    Quote Originally Posted by Minty View Post
    If you don't need to edit the data in the form then you can display a report in a form and that can grow and shrink in a continuous report style.
    That's quite a nice idea, however, users of the dB need to add notes which that tab (Notes) of the form is the section to do so.
    I don't really like my practical application in the sense the user needs to navigate to the bottom of the form to add a new record. When they close and reopen the form the latest date will then appear at the top.
    Maybe I should do as you say whereby I display a report in the form. Perhaps I need to add a button to the right of the page named "Add New Note" which will open a new window of Date and a text box for the user to capture their note against the project?
    Your thoughts would be appreciated.

  7. #7
    Minty is offline VIP
    Windows 10 Office 365
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,001
    Have two sub forms. One only enters data and is at the top of the main form, and is a standard single form, if they need more space then let a double click of the text box open a zoom control on it.
    Underneath it you mimic the form with a report that can grow to display the long text.
    Sort it so the most recent at the top, so your notes are in the most sensible order.

    No scrolling and easy data entry.
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  8. #8
    Blings's Avatar
    Blings is offline Competent Performer
    Windows 10 Office 365
    Join Date
    May 2020
    Location
    London, UK
    Posts
    125
    That's an even better solution.
    Thanks Minty.

  9. #9
    Blings's Avatar
    Blings is offline Competent Performer
    Windows 10 Office 365
    Join Date
    May 2020
    Location
    London, UK
    Posts
    125
    Strangely, the form data entry type changes from "Yes" to "No" after a couple times of use... as I definitely hit the save button. Tested it, works okay. I came back today and it changed to "No".
    Do we know what could cause this issue?

  10. #10
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Shot in the dark, but make sure it isn't being opened with OpenForm in Edit mode, and then saved with Close and the appropriate save argument.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  11. #11
    Blings's Avatar
    Blings is offline Competent Performer
    Windows 10 Office 365
    Join Date
    May 2020
    Location
    London, UK
    Posts
    125
    Using this to open the form:
    Code:
    Private Sub QR_Click()
    
    10        On Error GoTo QR_Click_Error
    
    
    20       DoCmd.OpenForm "frmEditQuote", , , "[ProvisionalQuoteID]=" & [ProvisionalQuoteID]
    
    
    30       DoCmd.Close acForm, "frmProvisionalQuotesListsubformKey"
    
    
    
    
    
    
              
    40        On Error GoTo 0
    50        Exit Sub
    
    
    QR_Click_Error:
    
    
    60        MsgBox "Error " & Err.Number & " (" & Err.Description & ") in procedure QR_Click, line " & Erl & "."
    
    
    End Sub
    This to close the form:
    Code:
    Private Sub cmdClose_Click()10    On Error GoTo cmdClose_Click_Err
    
    
    20        DoCmd.Close , ""
    30        DoCmd.Close acForm, "frmEditQuote"
    40        DoCmd.Close acForm, "frmProvisionalQuotesListsubform"
    
    
    50        DoCmd.OpenForm "frmProvisionalQuotesListsubform"
    60    [Forms]!frmProvisionalQuotesListsubform.Form.FilterOn = False
    
    
    
    
    cmdClose_Click_Exit:
    70        Exit Sub
    
    
    cmdClose_Click_Err:
    80        MsgBox Error$
    90        Resume cmdClose_Click_Exit
    
    
    End Sub

  12. #12
    Blings's Avatar
    Blings is offline Competent Performer
    Windows 10 Office 365
    Join Date
    May 2020
    Location
    London, UK
    Posts
    125
    Solution:
    Code:
    50        DoCmd.OpenForm "frmProvisionalQuotesListsubform", , , , acFormPropertySettings

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

Similar Threads

  1. Lines in a text field that can grow
    By Hasher in forum Reports
    Replies: 3
    Last Post: 12-10-2014, 11:30 PM
  2. Text Boxes Grow Horizontally
    By dvgef2 in forum Reports
    Replies: 4
    Last Post: 03-28-2013, 06:42 AM
  3. Form shadows grow darker with each record change
    By bikeordie1 in forum Access
    Replies: 8
    Last Post: 03-13-2013, 01:59 PM
  4. text box to grow or shrink horizontally
    By Ray67 in forum Reports
    Replies: 4
    Last Post: 01-29-2013, 07:50 PM
  5. Grow text box on form with focus
    By Karen H in forum Forms
    Replies: 5
    Last Post: 02-25-2011, 12:03 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