Exporting to Excel (1 Viewer)

sroot

Registered User.
Local time
Today, 11:00
Joined
Mar 18, 2013
Messages
53
Maybe someone out here can help. I do not know if it is possible but i figured the geniuses out here would know better than me! I have a database that gathers data and the user has to type all of it in excel for the current date... Is there any code i can get to export the info from the table to excel the specific cells in the workbook? Basically it would add the info into the row with the current date, field1 into column A field2 to column B etc... if it cant look at the current date maybe the next open row? Like i said i am not sure if it is possible or not but if it is i hope maybe someone knows. Thanks!
 

Rx_

Nothing In Moderation
Local time
Today, 12:00
Joined
Oct 22, 2009
Messages
2,803
Delete the Make Table Query MyTempTable
Make some user input form against the table with data.
Use a Make Table query to take the data with contrived dates and re-create MyTempTable

Go to this site:
http://btabdevelopment.com/code-snippets/page/2/

There are several vba examples of taking a table (in your case use MyTempTable) and create an Excel Workbook , worksheet to save at a specific location.

Put all of the above code in a click event that uses the user input date from / date to fields (or what ever criteria the business activity requires).

For further help, there is an Excel forum on this same Forums site.
http://www.access-programmers.co.uk/forums/forumdisplay.php?f=55
 
Last edited:

sroot

Registered User.
Local time
Today, 11:00
Joined
Mar 18, 2013
Messages
53
But how would i get it to the correct Row of the current date?
 

Rx_

Nothing In Moderation
Local time
Today, 12:00
Joined
Oct 22, 2009
Messages
2,803
RE: Basically it would add the info into the row with the current date, field1 into column A field2 to column B etc... if it cant look at the current date maybe the next open row?

That sounds like the Make Table Query part of the process.
Your description is too vague at this point.
Suggest that some sample data and a more detailed description of the desired business result be posted on the Query part of the forum.

Just describe some of the details such as:
Basic table name(s)
Basic Field names(s)
Is the query based on today's date or on a date range the user provides.
expected output

Once you get a Select Query that meets your objective
The resulting data can go directly to Excel - or be used to make a table, delete then re-append an existing table that can go to Excel.

My suggestion is to focus on creating the Select Query. From there, there are many ways to get that data into Excel.
 

Users who are viewing this thread

Top Bottom