Results 1 to 5 of 5
  1. #1
    rebfein's Avatar
    rebfein is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2015
    Location
    So Cal
    Posts
    114

    how do I get a datasheet results list to appear in a form?

    I created a simple query for my boss a year ago and who
    now wants the results to appear in a form.



    The query is set in a one (Model) to Many (ECOs pertaining to that model [ECO = Engineering Change Orders]) relationship.

    What I want to do is create a form where he enters the model number and clicks a button (these I have set up) to search for the results.

    What I can't get to work is the datasheet showing the search results as a list to appear on the form below the search information.

    Any suggestions?

    Click image for larger version. 

Name:	design view.jpg 
Views:	20 
Size:	278.4 KB 
ID:	35639

    Many thanks,

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Put the search control in the Form Header section. Consider using a combobox instead of textbox. This control should be UNBOUND, otherwise data in record will be changed when user types/selects value.

    Bind the form to the table or query. Put data controls in the Detail section.

    Review http://allenbrowne.com/ser-62.html
    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
    Peter M is offline Advanced Beginner
    Windows 7 64bit Access 2013 32bit
    Join Date
    Dec 2017
    Posts
    67
    There are a couple of ways to accomplish this. To do it without any VBA code, make a Parent Form and Sub Form which are joined by Model Number

    Data for your Parent/Main Form: qry_Models
    Data source for your Child/SubForm: The query that joins Model to ECO (qry_Data)

    Set the subform to be in datasheet mode or continuous mode to have a list of the ECOs

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Again, the 'search' control must be UNBOUND. Unless you want to use the intrinsic filter/search tools on the ribbon or right click shortcut. This means NOT typing or selecting value in BOUND control because that would change value in record.
    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
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    I have used both methods, depending on who is using the form and what I want to display/search for. I tend to use the main/sub form arraignment because no code required (except for the close buttons).

    I mostly use continuous forms view because I can control the control placement.

    Here are 4 layouts for you to tear apart .....
    Attached Files Attached Files

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

Similar Threads

  1. Replies: 4
    Last Post: 03-23-2018, 01:21 PM
  2. Replies: 3
    Last Post: 09-02-2013, 04:33 PM
  3. SQL search results in a datasheet
    By BasilM in forum Programming
    Replies: 7
    Last Post: 09-15-2012, 11:25 PM
  4. Replies: 8
    Last Post: 08-26-2012, 11:11 PM
  5. Replies: 4
    Last Post: 05-04-2012, 03:41 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