Results 1 to 2 of 2
  1. #1
    bigbox486 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Mar 2015
    Posts
    1

    Marco Condition based off a Query

    Hello,

    I have a macro that opens a report and then prints that report (simple 2 line macro). I have then created a query that returns values only if a date field = today's date. I would like to make this query a condition of the macro so that is the query returns any values the report will print, but if it doesn't have any values (NULL) then it will bypass this line in the macro.

    Any advice on how to go about this?

    Thanks!


    Bryan

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    You can use DCount(). You could also use the no data event of the report.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Generating a report based upon a condition
    By CaveCanem in forum Programming
    Replies: 2
    Last Post: 03-27-2014, 01:56 PM
  2. Calling a subform based on a condition
    By msmithtlh in forum Forms
    Replies: 6
    Last Post: 03-18-2013, 03:19 PM
  3. Add Query Based on if Condition
    By shakeelmscw in forum Queries
    Replies: 17
    Last Post: 01-18-2013, 02:35 AM
  4. Replies: 3
    Last Post: 11-19-2010, 01:48 PM
  5. Update 2 fields based on where condition.
    By Confused in forum Access
    Replies: 2
    Last Post: 11-19-2009, 05:21 PM

Tags for this Thread

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