Page 1 of 2 12 LastLast
Results 1 to 15 of 18
  1. #1
    Ray67 is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    338

    Display Query field in form?

    Hi,



    I have a
    form that allows the user to enter a start date and end date then a run query button. This displays a query that gives them the total records between the dates chosen. Instead of displaying the query in query form I would like it to display it in a form. The query will return multiple records.



    Thank you,


  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,929
    Set the form's RecordSource property to the query. Check this tutorial:

    http://datapigtechnologies.com/flash...tomfilter.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
    Ray67 is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    338
    How can i do this but to display multiple records at the same time???

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Set the form to Continuous View.
    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
    Ray67 is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    338
    Thank you for your help it worked great. Just have one more questions. I'm using one combo box and it works great, but i would like to add two more combo box. The other two combo box would be for dates. How can i do this???

  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,929
    The dates have to come from somewhere. The combobox RowSource would be generated same as for any other data. You have a table with date field that can be the source for date values?
    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
    Ray67 is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    338
    Yes i have a table with date field. I would like to use a text box. So user's can enter date.

  8. #8
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    So you don't want combobox for date values?

    On reflection, I have ever used a combobox for data entry of dates but certainly can. I have used a listbox to restrict date selection to dates in table for filter criteria.

    I use textbox and input mask for dates: 99/99/"20"00;0;

    A textbox won't restrict users to only dates in the table.
    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.

  9. #9
    Ray67 is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    338
    For the date i don't want to use combo box. I would like for the user to be able to enter the date.

  10. #10
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    So did my suggestion work for you?
    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.

  11. #11
    Ray67 is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    338
    i try using the text box but it doesn't return any data now. What i'm i missing???

  12. #12
    Ray67 is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    338
    With the combo box i would use row source. With text box there is the row source.

  13. #13
    Ray67 is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    338
    The reason i don't want to use a list box is because all of my provider would end up with the same date. So in the list box it shows multiple of the same date.

  14. #14
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    You mean 'With text box there is NOT the row source.' ?

    You are using the date as criteria for a parameterized query? I seldom use queries like that.

    Issue might be if no date criteria is entered. The query is still going to try to search for a date value. I don't think Like and wildcard works with date criteria. Give an alternate date value that is far enough in past or future that all records will be captured. Something like:

    BETWEEN Nz([start date criteria], #1/1/1900#) AND Nz([end date criteria], #12/31/2900#)

    Another issue might be if you are searching for exact date and the field has time part.

    Need to know more about your data and the query.

    Show the SQL statement. Show sample of date values from table. Or provide project for analysis. Follow instructions at bottom of my post. Identify the objects involved in issue.
    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.

  15. #15
    Ray67 is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    338
    my user's would never look for exact date. The user would enter first date of the month and the last date of the month. So i would like to show all of the data for the month.

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 6
    Last Post: 10-20-2011, 11:27 AM
  2. Replies: 3
    Last Post: 08-19-2011, 09:25 AM
  3. Replies: 5
    Last Post: 08-11-2011, 05:38 PM
  4. Display Web Page in a MS Access Form/Field
    By webinteractive in forum Forms
    Replies: 3
    Last Post: 04-01-2011, 03:53 PM
  5. Report control of a field display/no display
    By systems013 in forum Reports
    Replies: 5
    Last Post: 02-01-2010, 09:44 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