473,396 Members | 1,847 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,396 software developers and data experts.

Table with No Data

I am using the following code to export a table into an Microsoft Excel
Speadsheet.

Dim strSql1 As String
DoCmd.SetWarnings False
DoCmd.OpenQuery "qDeleteNewsletterLabels"
DoCmd.OpenQuery "qStudentsNewsletterLabelList"
DoCmd.OpenQuery "qVolunteerNewsletterLabels"
DoCmd.OutputTo acOutputTable, "tblNewsletterlabels", acFormatXLS,
"Newsletterlabels.xls", True
DoCmd.RunSQL strSql1
DoCmd.SetWarnings True

Is there a way to confirm that there is data in the table before the empty
spreadsheet is generated?

Glen

Nov 12 '05 #1
1 1626
On Wed, 26 Nov 2003 17:51:23 GMT, "Home" <do********@e-mail.com>
wrote:
I am using the following code to export a table into an Microsoft Excel
Speadsheet.

Dim strSql1 As String
DoCmd.SetWarnings False
DoCmd.OpenQuery "qDeleteNewsletterLabels"
DoCmd.OpenQuery "qStudentsNewsletterLabelList"
DoCmd.OpenQuery "qVolunteerNewsletterLabels"
DoCmd.OutputTo acOutputTable, "tblNewsletterlabels", acFormatXLS,
"Newsletterlabels.xls", True
DoCmd.RunSQL strSql1
DoCmd.SetWarnings True

Is there a way to confirm that there is data in the table before the empty
spreadsheet is generated?

Glen


If it is empty this will return zero.
DCount("*","tblNewsletterlabels")

- Jim
Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Eric | last post by:
I'm trying to insert data for a real-time application that demands less than 3 second receipt-to-commit time, has a relatively large (500,000 records/hr) data rate, and requires access times on the...
36
by: toedipper | last post by:
Hello, I am designing a table of vehicle types, nothing special, just a list of unique vehicle types such as truck, lorry, bike, motor bike, plane, tractor etc etc For the table design I am...
61
by: Toby Austin | last post by:
I'm trying to replace <table>s with <div>s as much as possible. However, I can't figure out how to do the following… <table> <tr> <td valign="top" width="100%">some data that will...
3
by: Marty McDonald | last post by:
I have <asp:Table... </asp:Table> on my webform. In codebehind, I populate a DataTable whose data should appear in the asp:Table. I created my own code to populate the asp:Table with the...
6
by: jjturon | last post by:
Can anyone help me?? I am trying to pass a Select Query variable to a table using Dlookup and return the value to same select query but to another field. Ex. SalesManID ...
117
by: phil-news-nospam | last post by:
Is there really any advantage to using DIV elements with float style properies, vs. the old method of TABLE and TR and TD? I'm finding that by using DIV, it still involves the same number of...
5
by: joshua.nicholes | last post by:
I have an access database that consists of two tables.A data collection table and a species list table. The data collection table has about 1500 records in it and the species list has about 600....
4
by: Bob | last post by:
Hi all, I've got a table that I've imported and it has junk at the top of the table, so after import I run a delete query to remove the junk lines then I'm left with the field names I want for...
7
oll3i
by: oll3i | last post by:
i want to change the values in two columns one colum is a combobox and the secons column is editable too i want to get the value of that second column and the value of combobox and sent that...
9
by: dli07 | last post by:
Hello, I'm trying to convert a piece of code that creates a dynamic vertical resizing bar in a table from internet explorer to firefox. It's based on a post from...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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:
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.