Page 2 of 2 FirstFirst 12
Results 16 to 18 of 18
  1. #16
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    Combo/list box RowSource can be an SQL that will show only distinct values, like:
    SELECT DISTINCT fieldname FROM tablename ORDER BY fieldname;

    If only want 1 month there are ways to set up query and criteria so user doesn't have to enter two full date values. They could just pick a month from a combobox list.
    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.

  2. #17
    Ray67 is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    338
    How can i do it by month and year? The user would only have to pick Month and year.

  3. #18
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    Variety of approaches. Can choose month from combobox and enter year in textbox (or choose from a combobox list). Then code would build the begin and end dates. The end date is always trickiest because not every month has same number of days. But as I just learned, DateSerial handles that nicely.

    consider m = the name of month control and y = name of year control

    BETWEEN DateSerial(y, m, 1) AND DateSerial(y, m+1, 0)
    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.

Page 2 of 2 FirstFirst 12
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