Exporting Query with linked subdata in same format (1 Viewer)

Waka0212

New member
Local time
Today, 09:14
Joined
Oct 30, 2019
Messages
17
Hello all, I'm pretty new to forums so please bare with me.


I have a database that collects vasts amounts of data and then I have Queries that allow me to view selected items and so forth. I have a Query built that pulls data and then I have a subdata link that shows orders against the main data underneath it. Now the problem. I'm trying to export this query with the sub data to Excel, but I am having no luck. I've made a report which does work, but is too large. I want it in Excel because I can make it smaller and fit on one page. I can export it to excel but the data all shifts to the right and not in line or with the original item. I've been doing a fare bit of research and have seen that apparently its near impossible to do this without coding and coding is my weakness. I've trying to teach myself, but this seems out of my league. I've seen someone mention a add-in called A2EE.mda, but there is no data on it and it seems phishy to me. The links that go to the sites are either no working or want me to pay. At this point, I don't want to have to pay to do this since this project isn't even for me. Any help would be appreciated. Thanks in advance.
 

Gasman

Enthusiastic Amateur
Local time
Today, 14:14
Joined
Sep 21, 2011
Messages
14,235
Best I can think of is to use a union query and build a structure where the order has a key of 0 and the order detail lines have a key of 1 and then sort by key annd order number.?

Only problem with that, may be that the columns contain different type data.?

HTH
 

CJ_London

Super Moderator
Staff member
Local time
Today, 14:14
Joined
Feb 19, 2013
Messages
16,607
I've made a report which does work, but is too large. I want it in Excel because I can make it smaller and fit on one page.

Why not modify your report - use smaller font sizes, reduce controls to fit
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 09:14
Joined
Feb 19, 2002
Messages
43,223
I had a similar problem and simply couldn't make the size work in Access. I really needed the size to fit capability of Excel. I think my solution was to create the report in Access and in the on format event of each section, write the data from each control to excel. At the end of the report, I selected all and issued the size to fit command.

I'm out for the day but if you still need help, I'll look for the code tomorrow and post it here.
 

CJ_London

Super Moderator
Staff member
Local time
Today, 14:14
Joined
Feb 19, 2013
Messages
16,607
If you are talking about size to fit in terms of column widths rather than the number of columns, you could create a datasheet subreport - then a bit of code to loop through the columns and set columnwidths to -2 (which is size to fit)
 

Users who are viewing this thread

Top Bottom