Results 1 to 6 of 6
  1. #1
    Remster is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Sep 2010
    Posts
    317

    Displaying query results within a form

    I want to display the results of a query within a form (for information for the person inputting data). The most common suggestion I've come across is to use a list box. I need the contents of the list box to be determined by a value that's entered elsewhere in the record in question. How do I achieve this?

  2. #2
    weekend00 is offline I may not be right
    Windows XP Access 2003
    Join Date
    Aug 2010
    Posts
    1,295
    I need the contents of the list box to be determined by a value that's entered elsewhere in the record in question. How do I achieve this?
    try a sub form, it can link to the main form.

  3. #3
    Remster is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Sep 2010
    Posts
    317
    Quote Originally Posted by weekend00 View Post
    try a sub form, it can link to the main form.
    The problem is that I want the data to be there for information only, and I want it to be drawn from various sources using 'UNION'. Presumably I can't have the first two records in a subform autocomplete with values from one source (say) and the rest with values from another source.

  4. #4
    weekend00 is offline I may not be right
    Windows XP Access 2003
    Join Date
    Aug 2010
    Posts
    1,295
    Although I am not 100% understand what you said, I think if you can get them into the list box, then you can in a subform.

    If you want a listbox, you need to put some code in afterupdate event of the text box which contain the determine value. In the code, you can decide to show which value in the listbox.

  5. #5
    Remster is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Sep 2010
    Posts
    317
    Thanks for your advice. I've decided to go back to the drawing board and rethink my table relationships. Fortunately this is still at the experimental stage!

  6. #6
    pkstormy's Avatar
    pkstormy is offline Access/SQL Server Expert
    Windows XP Access 2003
    Join Date
    Mar 2010
    Location
    Madison
    Posts
    682
    This works nicely:
    https://www.accessforums.net/code-re...mple-7571.html

    It lets you embed any query into a form.

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

Similar Threads

  1. Replies: 6
    Last Post: 05-14-2012, 07:24 AM
  2. Replies: 0
    Last Post: 03-31-2010, 07:52 AM
  3. Displaying Query Properties in a Form
    By Bjar in forum Programming
    Replies: 1
    Last Post: 07-16-2008, 07:51 AM
  4. Entering query results in a form
    By marcello.dolcini in forum Forms
    Replies: 0
    Last Post: 04-15-2007, 06:01 PM
  5. Form field not displaying in query
    By Valeda in forum Queries
    Replies: 2
    Last Post: 05-05-2006, 10:08 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