Results 1 to 2 of 2
  1. #1
    Alex Motilal is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Nov 2008
    Location
    Coimbatore, India
    Posts
    192

    Dialog Box Form


    I have created a pop up Dialog Box Form with the following controls:

    1. A Combo Box from which Cotton Season can be selected (eg, 2015-16, 2016-17 & so on. A Cotton Season in India starts from 1st October & ends in September 30th).
    2. A Text box to enter the Start Date.
    3. A Text box to enter the End Date.
    4. A Command Button to generate Purchase Report.
    What I need is after selecting a Season the Report should generate for all the dates of the Season in no dates are entered.
    If a Start date is entered & the End date is left blank, the Report should generate from the start date to the last date of the season selected.
    If both the Start & End dates are entered, the Report should generate for the Date Range entered.
    Also a message box should appear to warn wrong date have been entered if the dates are not related to the Season.
    There is a tblSeason with columns txtSeason, dtStart & dtEnd apart from the ID.
    Alex

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    Use VBA to build criteria string. Here is an example of code that conditionally builds criteria string http://allenbrowne.com/ser-62code.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.

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

Similar Threads

  1. Replies: 6
    Last Post: 07-07-2017, 12:23 AM
  2. Replies: 11
    Last Post: 01-16-2017, 11:46 PM
  3. Replies: 3
    Last Post: 01-09-2017, 03:27 PM
  4. Replies: 0
    Last Post: 02-15-2011, 01:43 PM
  5. Dialog box form example
    By pkstormy in forum Code Repository
    Replies: 0
    Last Post: 08-30-2010, 10:45 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