View Full Version : moving data between subreports problem


xacly
08-17-2009, 07:15 AM
Hello all,

I guess this is inside the forum somewhere but I cannot find it and I am sorry to ask again.

I have spent one whole day or more on this and still no closer to solving my issue.

I have a main report with two sub-reports named say, SubReport1 and SubReport2.
They both get their information individually from queries named say Query1 and Query2.

One query gets information from an "account" field and filters it for a value.
The second query gets it's information from the same "account" field but filters it for a different value.

Now, when I make the SubReport1 using Query1 and load it on the main form it works just 100% fine. I get my 25 lines of individual data with the correct details.

When I make the SubReport2 using Query2 and load it on the form it works just 100% fine. (Yeah, I think I see some smiles in the background somewhere!!!...hehehehe) Again, I get my 25 lines of individual data with the correct details.

Now, I want to take just ONE value/field/slice of data from SubReport2 and place it inside SubReport1. I have put

=Reports!DepSchReport!AccDepTotQxx.Report!Text255

and whoopee...I get a value beside the 25 lines in the correct place. However, the value is correct for just the FIRST record from SubReport2, and the other 24 lines all show the same value which is not correct.

Now, I am certainly NOT a programmer and do this project for brain exercise only to be honest. I have 90% completed this task and so far have managed to work out most stuff by searching etc. This one has me stumped. I have tons of time so if someone has a fix, or a completely different way of doing it either with forms or reports I will be so happy. But please folks, if possible can we keep it to the basics.

I have no other need for SubReport2 other than to get the info above and it will be hidden eventually so if that makes it any easier for you good.

Thanks so much

Dave

Uncle Gizmo
08-17-2009, 08:56 AM
I’m sure you don’t mean report and sub reports, you mean form and subforms don’t you?

If it is forms you are dealing with then you may find this thread here helpful.

Time Management Matrix (http://msaccesshintsandtips.ning.com/profiles/blogs/948619:BlogPost:150)

xacly
08-17-2009, 09:48 PM
Thanks Uncle for the reply.

Well, with my description above I could make that scenario in either Forms or Reports but the result was always the same. I downloaded your file and had a good look but am not so sure that is what I need. Thanks all the same.

I will try again and explain to see if I can improve on my description of the problem.

Everything works just fine until I move the data from say TEXT12 on the subform to TEXT25 on the other form. As soon as I go into form view I see the same number beside row 1, row 2, row 3 etc. In fact Row 1 should show 200, row 2 should show 2000 and row 3 should show 77 which are the respective rows in the form/report from where it is taken. In fact the number which is repeated is ALWAYS the same value as the row selected in the report from where the data comes from. So if I was to use the record selector and select row 3 then every number would be 77.

Don't know if that helps but thanks anyway for replying.

Cheers
Dave

Uncle Gizmo
08-17-2009, 10:35 PM
>>> Well, with my description above I could make that scenario in either Forms or Reports <<<

Yes, that's the point it's not clear which, and there is a considerable difference.

Uncle Gizmo
08-17-2009, 10:46 PM
From your question I deduce the following, You say:
One query gets information from an "account" field and filters it for a value.
The second query gets it's information from the same "account" field but filters it for a different value.

What I read this to mean is that you have data from the same Table appearing in separate subforms, the distinction being the criteria you used to filter this data. The subforms display data from the same table, however the set of data is determined by a value in a field.

Now if my assumption is correct, then the example I directed you to shows data from the same table in four separate subforms, the only difference being the criteria used to select which set of data to display in a particular sub form.

It seems to me that it’s the same problem, the solution is in that example I showed you, you should be able to adapt that to move your records from one sub form to another.

However if that’s not the case then please explain.