Condition for No Data

Discussion in 'Microsoft Access Macros' started by Jani, Aug 25, 2009.

  1. Jani

    Jani Guest

    I have a macro which appends a temp table to a SQL table and then deletes
    data in the temp table but only if the Close field is a 'Y.' Sometimes there
    is no 'Y' in the Close field in the temp table. How do I write a condition so
    that a message pops up stating that no records were appended? Thanks! Jani
     
    Jani, Aug 25, 2009
    #1
    1. Advertisements

  2. Jani,

    Try like this for your Condition for a MsgBox action:

    DCount("*","NameOfTempTable","[Close]='Y'")=0

    --
    Steve Schapel, Microsoft Access MVP


    "Jani" <> wrote in message
    news:...
    > I have a macro which appends a temp table to a SQL table and then deletes
    > data in the temp table but only if the Close field is a 'Y.' Sometimes
    > there
    > is no 'Y' in the Close field in the temp table. How do I write a condition
    > so
    > that a message pops up stating that no records were appended? Thanks! Jani
     
    Steve Schapel, Aug 25, 2009
    #2
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ken Snell
    Replies:
    0
    Views:
    573
    Ken Snell
    Aug 14, 2003
  2. Ken Snell

    Re: Macro Where Condition on form open

    Ken Snell, Aug 26, 2003, in forum: Microsoft Access Macros
    Replies:
    0
    Views:
    733
    Ken Snell
    Aug 26, 2003
  3. JUAN

    No Data in Condition

    JUAN, Jun 3, 2004, in forum: Microsoft Access Macros
    Replies:
    5
    Views:
    189
    Ken Snell
    Jun 5, 2004
  4. Guest

    Help with syntax for WHERE condition or just Condition

    Guest, Jun 22, 2005, in forum: Microsoft Access Macros
    Replies:
    0
    Views:
    354
    Guest
    Jun 22, 2005
  5. Guest

    Filter OUT Data....... in Macro Condition

    Guest, Nov 21, 2005, in forum: Microsoft Access Macros
    Replies:
    3
    Views:
    262
Loading...

Share This Page