PC Review


Reply
Thread Tools Rate Thread

Condition for No Data

 
 
Jani
Guest
Posts: n/a
 
      25th Aug 2009
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
 
Reply With Quote
 
 
 
 
Steve Schapel
Guest
Posts: n/a
 
      25th Aug 2009
Jani,

Try like this for your Condition for a MsgBox action:

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

--
Steve Schapel, Microsoft Access MVP


"Jani" <(E-Mail Removed)> wrote in message
news:E4672871-71D7-4102-AF86-(E-Mail Removed)...
> 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


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Get data with certain condition TQ Microsoft Excel Misc 4 7th Jun 2008 01:36 AM
delete all data in a row with condition on the row sverre Microsoft Access 1 19th May 2008 09:55 AM
Sum of data where a condition applies =?Utf-8?B?a2lwcGVycw==?= Microsoft Excel Misc 1 20th Mar 2007 12:45 PM
No Data in Condition JUAN Microsoft Access Macros 5 5th Jun 2004 02:43 AM
data validation and certain condition norika Microsoft Excel Misc 2 13th May 2004 12:52 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:29 AM.