Results 1 to 8 of 8
  1. #1
    fhickler is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Nov 2018
    Posts
    34

    Editable AND grow/shrink?

    Access non-expert here, so sorry if this is a newbie-ish question.

    I have a simple relational database with 2 tables, each record in Table A relates to many records in Table B. I have a master form that has both tables next to one another, related via a master text field. You select a record in Table A and all the related records display in Table B. So far so good. One of Table B's fields is a multi-line text field. I want that field to grow/shrink depending on the amount of text in it, and I also want to be able to edit the field.



    If Table B is inserted into the master form as a subform, the field can be edited, but cannot grow/shrink - my understanding is that is not possible on subforms. If it is inserted as a sub report, it can grow/shrink, but cannot be edited - again, my understanding is that subreports cannot be edited.

    Is it possible to somehow have the best of both worlds, with editable text fields that also grow/shrink?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    Controls don't grow/shrink on forms. That is what reports allow for. Textbox on form will have vertical scroll bar.

    What do you mean by 'multi-line' text field? Textbox set to generate new line with ENTER key?
    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
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,941
    Grow/shrink only works on print and print preview - including forms

    if this is standard form view you would need code to change the height - in the form current and perhaps the control change or after update event where you calculate the height required and adjust the top position of any control below the control you want to adjust

    edit - note in a continuous form , this adjustment would affect all rows

    have you considered using the zoom box for adding/editing data?

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    Actually, also works in Report View. Which is how a report would display when installed on a 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.

  5. #5
    fhickler is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Nov 2018
    Posts
    34
    I thought I'd clarify my question with a screenshot. This is a form with a subform on the left, based on table A, which is a table of rooms/equipment (ignore the colors and boxes, etc - just think of it as a normal table). To the right of that is a subreport based on table B, which is a related table of notes for each record in table A. To the right of that is a subform, also based on table B. When I select a record in table A, it shows me all the related notes records for that room/piece of equipment. So far so good. Here is the issue: the subreport has text boxes that grow and shrink nicely, but cannot be edited. The subform has text boxes that can be edited, but don't grow/shrink. What I would like is a way to have the notes show up in such a way that they can be edited AND will grow/shrink. Is there any way anyone can think of to achieve this?

    Click image for larger version. 

Name:	Image 7-19-24 at 11.51 AM.jpeg 
Views:	22 
Size:	41.7 KB 
ID:	52034

  6. #6
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,941
    Think we all understand what you are trying to achieve - and it’s not possible

    only way would be edit is to use a pop up form that can sized to match the position and size of the selected record, populate with the text then save and update the record based in some event. Can be done but requires a lot of code and does not really work the way you would want

  7. #7
    fhickler is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Nov 2018
    Posts
    34
    That actually gives me a couple ideas that I might play around with. Thanks.

  8. #8
    fhickler is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Nov 2018
    Posts
    34
    Quote Originally Posted by fhickler View Post
    That actually gives me a couple ideas that I might play around with. Thanks.
    I decided to display the report with edit buttons, as is explained in this video:
    https://www.youtube.com/watch?v=W2h6qYlTDHE

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

Similar Threads

  1. Replies: 6
    Last Post: 07-29-2021, 09:00 AM
  2. Auto shrink/grow fields
    By Thompyt in forum Forms
    Replies: 10
    Last Post: 10-26-2014, 04:35 PM
  3. Shrink text to fit
    By Derrick T. Davidson in forum Reports
    Replies: 1
    Last Post: 04-02-2013, 11:59 AM
  4. text box to grow or shrink horizontally
    By Ray67 in forum Reports
    Replies: 4
    Last Post: 01-29-2013, 07:50 PM
  5. Replies: 1
    Last Post: 10-10-2012, 12:25 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