Results 1 to 6 of 6
  1. #1
    jtm013 is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Aug 2014
    Posts
    117

    Help- Expanding SubForm

    Hello,

    I didn't find anything that was quite like my problem in the search so apologies if this has been addressed before.

    I am putting together a database that will be used as an index of sorts for chemical safety sheets.
    The sheets themselves are pdfs linked to their respective record.



    The idea is that this database will be user friendly for folks who during their day to day do not use computers and who are attempting to access information about chemicals they are using, which in all likelyhood have had their labels damaged, smudged etc. To that end I have implemented a search form which allows the user to search by a number of different criteria such as manufacturer name, product name, etc.

    This form is set up with a subform which displays the results of the search query. In an ideal world the user would be able to enter the chemical ID # and go straight to the needed record. However, I have been assured it is far more likely they will have to search by a broader category and then scroll through the records to figure out which one they need. And this brings me to the problem.

    I need the subform which displays the search results to grow based on the number of records needing to be displayed. I know that the CanGrow property is only useful when printing or in preview mode, but surely there is a way to do this using vba.

    Any and all assistance is appreciated...sorry about the long winded explanation.

  2. #2
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    I've never used it, but the prolific Stephen Lebans has a hack that gives Controls on Forms the same CanGrow functionality as is available on Reports. You can download it from here:

    http://www.lebans.com/cangrow.htm

    Linq ;0)>

  3. #3
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    The question concerned how to make 'search results to grow based on the number of records'. Does this mean you want the form to grow? Why would you need form to grow? Growing form is not practical because of screen limits. That's what scrolling is for.
    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.

  4. #4
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    Quote Originally Posted by June7 View Post

    ...Does this mean you want the form to grow...
    I read it that he wants the Subform Control, that holds the retrieved Records, to expand, but obviously it can only expend so much. As I said, I've never used Stephen's hack, but his usual attention to detail would make me think that he's accounted for this.

    To be honest, I'm not a big fan of this sort of thing; I would simply design the Subform Control to a size that would hold X number of Records and expect the user to scroll, if need be, as you suggested. I always avoid making the user scroll, in order to see a complete Record, but scrolling, when multiple Records are present, is simply something that has to be put up with, in most situations.

    Linq ;0)>

  5. #5
    jtm013 is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Aug 2014
    Posts
    117
    Quote Originally Posted by Missinglinq View Post
    I read it that he wants the Subform Control, that holds the retrieved Records, to expand, but obviously it can only expend so much.
    You read it correctly. The context of the information and search lends itself to a maximum # of total search results being about 10-15 records.
    Each record only occupies approximately .2" and the information on the search page (Instructions box and the search box itself) take up no more than 2 inches of vertical space. There would be no problem with exceeding the maximum size of the parent form.

    My only problem with the scrolling is A) the supervisors of the folks who will be using this are under the opinion their staff can't figure out a scroll bar, B) that it would look unprofessional to stretch my subform size to where it would show all records in the maximum search result scenario, because that would leave empty un-formatted space if fewer than the maximum number of results were displayed.

    It sounds like it isn't going to be worth my trouble to get rid of the scroll bar so I may just tell the supers they will have to deal with scrolling.

  6. #6
    jtm013 is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Aug 2014
    Posts
    117
    Haven't solved this, but I'm giving up on it.

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

Similar Threads

  1. Expanding text string
    By KevinG in forum Access
    Replies: 9
    Last Post: 07-09-2013, 02:17 PM
  2. Expanding sections
    By Count Duckula in forum Reports
    Replies: 2
    Last Post: 06-13-2013, 11:36 PM
  3. Date expanding?
    By tylerg11 in forum Access
    Replies: 1
    Last Post: 03-04-2013, 03:34 PM
  4. expanding access database
    By sloppyjoe778 in forum Access
    Replies: 8
    Last Post: 12-12-2011, 12:13 AM
  5. Expanding a form's data fields
    By hertfordkc in forum Forms
    Replies: 6
    Last Post: 07-18-2011, 12:33 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