MushroomKing
Registered User.
- Local time
- Today, 03:43
- Joined
- Jun 7, 2018
- Messages
- 100
Hi everyone!
I've been trying to export queries to excel in vba. Which works alright but needs some work still.
I am completely stuck on where to start when it comes to exporting the data in dynamic (date) cells. Let me explain:
- I have multiple queries in Access. (Qry1, Qry2, Qry3)
- I have an Excel workbook with a sheet that needs to be filled out.
- I have a date column in Excel
- My exported queries are filling in the rows.
This works, but i want to export to the row with the same date that i specified in access!
So if my dates in Excel are in column A, and the date in the Access form field = equal to the date in Row 1 in Excel, i want to export to:
Qry1 > B1
Qry2 > C1
Qry3 > D1
If that makes sense :S. So far i only have this:
Can somebody please help me with this? I have no clue.
Also would like to keep it simple, im not an Access guru really.
I've been trying to export queries to excel in vba. Which works alright but needs some work still.
I am completely stuck on where to start when it comes to exporting the data in dynamic (date) cells. Let me explain:
- I have multiple queries in Access. (Qry1, Qry2, Qry3)
- I have an Excel workbook with a sheet that needs to be filled out.
- I have a date column in Excel
- My exported queries are filling in the rows.
This works, but i want to export to the row with the same date that i specified in access!
So if my dates in Excel are in column A, and the date in the Access form field = equal to the date in Row 1 in Excel, i want to export to:
Qry1 > B1
Qry2 > C1
Qry3 > D1
If that makes sense :S. So far i only have this:
Code:
DoCmd.TransferSpreadsheet acExport, 8, "Qry1", "C:\accesstool...", True, "B1"
Can somebody please help me with this? I have no clue.
Also would like to keep it simple, im not an Access guru really.