473,387 Members | 1,864 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

How not to output when OutputTo function returns no records?

Hi..

I have a question regarding the DoCmd.OutputTo function.

I am automating some email scheduling with file attachments generated from OutPutTo function.

However, some of the daily OutPutTo functions do not necessarily return any records. For such cases, my program is still attaching empty files (with no records) in the email.

How can my program check that the OutputTo function did not return any records?

Much appreciated if anyone could advise.

Cheers!
Clarence
Oct 16 '07 #1
2 1284
missinglinq
3,532 Expert 2GB
I would think you need to check your table or query to see whether it contains any records before carrying out the operation. DCount() should do the job!

Expand|Select|Wrap|Line Numbers
  1. If DCount("*", "YourTable") > 0 Then
  2.   MsgBox "Carry out your OutPutTo Operation"
  3. Else
  4.   MsgBox "Don't carry out your OutPutTo Operation"
  5. End If
  6.  
Linq ;0)>
Oct 16 '07 #2
Hi Linq,

Thank you very much for your assistance.

Have a great day!

Clarence



I would think you need to check your table or query to see whether it contains any records before carrying out the operation. DCount() should do the job!

Expand|Select|Wrap|Line Numbers
  1. If DCount("*", "YourTable") > 0 Then
  2.   MsgBox "Carry out your OutPutTo Operation"
  3. Else
  4.   MsgBox "Don't carry out your OutPutTo Operation"
  5. End If
  6.  
Linq ;0)>
Oct 18 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Mal | last post by:
Hi, I have a button on a form that outputs a report to word. While it has been working well for a while, today it is not. The behaviour now is that it endlessly outputs pages to word. There...
3
by: Jorge Cecílio | last post by:
Hi! I would like to export some MS-Access reports output to pdf. However, the only possibility offered by Access (afaik) for me to export formatted output is snp (snapshot) (I use MS-Office...
9
by: tomblower | last post by:
Access 2000 fully updated Three PCs manage data held on a server. They each have a front-end mdb file linked to tables on the server and on each PC. A problem has arisen over the following line...
7
by: ashtek | last post by:
Hi, I have a generic function that executes a stored procedure & returns a data table. Code: === public static DataTable ExecuteStoredProcedure(string strProc,SqlParameter paramArray) {...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.