Results 1 to 10 of 10
  1. #1
    taimysho0 is offline Competent Performer
    Windows XP Access 2000
    Join Date
    Nov 2011
    Posts
    286

    Display QUERY results into SUB FORM

    Hello, i have a form with a textbox where the user enters the channel id. a query runs and a table pops open with rows that only have those channel ids as well as columns that are relevent to the user.




    how do i make it so that instead of a table opening with the query results, a sub form can display this data on the same form the user enters the channel id? i need it to be editable so i HAVE to use a subform and not a listbox. a pic is included to show what the form looks like.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,898
    From what I can see of that form's structure, would not need subform. Put the search box (which I hope is not bound) in the form Header section. Set form to Continuous View and arrange the data controls in Detail section to look like datasheet. Put the control labels in the Header section. Form RecordSource would be the query.
    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
    taimysho0 is offline Competent Performer
    Windows XP Access 2000
    Join Date
    Nov 2011
    Posts
    286
    thanks for the help! what do i put in the button click event?

  4. #4
    taimysho0 is offline Competent Performer
    Windows XP Access 2000
    Join Date
    Nov 2011
    Posts
    286
    heres what my form looks like now:

  5. #5
    Join Date
    Nov 2011
    Location
    Hamilton, NZ
    Posts
    18
    If you want to use a subform, you dont have to bound the form. Find attached the dummy database which might help you resolve your issue.

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,898
    Depends on how you want to perform the filtering. If the query has the textbox as criteria parameter, just Me.Requery should work. Since there is only the one input, could use the AfterUpdate event of textbox, one less click user has to be bothered with.

    Also, suggest that input could be a combobox. How many channel IDs are there?
    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.

  7. #7
    taimysho0 is offline Competent Performer
    Windows XP Access 2000
    Join Date
    Nov 2011
    Posts
    286
    Quote Originally Posted by GrandMasterSexay View Post
    If you want to use a subform, you dont have to bound the form. Find attached the dummy database which might help you resolve your issue.

    sorry that didnt work, im using access 97?

  8. #8
    taimysho0 is offline Competent Performer
    Windows XP Access 2000
    Join Date
    Nov 2011
    Posts
    286
    Quote Originally Posted by June7 View Post
    Depends on how you want to perform the filtering. If the query has the textbox as criteria parameter, just Me.Requery should work. Since there is only the one input, could use the AfterUpdate event of textbox, one less click user has to be bothered with.

    Also, suggest that input could be a combobox. How many channel IDs are there?

    oh ok, that worked! now when i write into the textbox and want to add to the table, would i need to include a button to run an append query or how would that work? thanks

  9. #9
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,898
    Just click into a field of the new row and start entering. This initiates record. Record is committed when form closes, move to another record, or run code to save.

    What is that unbound textbox in the Detail section? You need to resize the Detail section so won't be 5 inches between records.
    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.

  10. #10
    taimysho0 is offline Competent Performer
    Windows XP Access 2000
    Join Date
    Nov 2011
    Posts
    286
    i see. thanks for your help! i have another question on how to copy the data on my subform and paste into an excel spreadsheet with headers included. but ill just make another thread since its a separate topic.

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

Similar Threads

  1. Replies: 1
    Last Post: 12-01-2010, 11:10 AM
  2. Form/Query Display Results Question
    By AcmeGearSteve in forum Access
    Replies: 5
    Last Post: 10-12-2010, 01:21 PM
  3. Display Query Results on a Form
    By P5C768 in forum Queries
    Replies: 5
    Last Post: 05-04-2010, 11:04 AM
  4. display query results in a form
    By P5C768 in forum Queries
    Replies: 3
    Last Post: 08-14-2009, 03:02 PM
  5. Form to display results
    By Zholt in forum Forms
    Replies: 9
    Last Post: 05-07-2009, 10:09 AM

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