469,272 Members | 1,438 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,272 developers. It's quick & easy.

Subform -> Report

Currently I am creating a Access Program that will search a list of records and then display the results of the search at the bottom of the screen in a sub form. What I want to be able to do is display the results of the subform into a report. But I cannot for the life of me figure out how to do it. Coding is not my forte so feel free to dumb it down for me. I was thinking I would need to create string and then do

str = ???

DoCmd OpenReport "Panel", acpreviewnormal, , str

For this example my main table is called panel

Contains fields such as MO, Qty, date, name, contractor, etc.
My subform is called panels it also contains the same information. So what do i need to make my str = ??? work? I am confused. Anyways thanks for the help. Bye.
Sep 24 '07 #1
2 1848
Currently I am creating a Access Program that will search a list of records and then display the results of the search at the bottom of the screen in a sub form. What I want to be able to do is display the results of the subform into a report. But I cannot for the life of me figure out how to do it. Coding is not my forte so feel free to dumb it down for me. I was thinking I would need to create string and then do

str = ???

DoCmd OpenReport "Panel", acpreviewnormal, , str

For this example my main table is called panel

Contains fields such as MO, Qty, date, name, contractor, etc.
My subform is called panels it also contains the same information. So what do i need to make my str = ??? work? I am confused. Anyways thanks for the help. Bye.
I figured out how to make it display a single field that a searched for by just doing

sti = " [MO] = " & me.qMO

but that doesn't truly display what is on the sub form. Secondly what happens if I search for multiple fields. It won't take that into account? For example I might want to search for a MO and a job code. How do I make it output the results of that search? I could attach my current database if needed.
Sep 24 '07 #2
Jim Doherty
897 Expert 512MB
I figured out how to make it display a single field that a searched for by just doing

sti = " [MO] = " & me.qMO

but that doesn't truly display what is on the sub form. Secondly what happens if I search for multiple fields. It won't take that into account? For example I might want to search for a MO and a job code. How do I make it output the results of that search? I could attach my current database if needed.

Hi Soundman,

PM me with your email address and I'll send you a small db that I put together for newbies which might prove useful for you in your learning escapades. It handles searching in combination with other fields using wildcard and reporting from a subform. Adding new records when not in the db from the same search screen. The report considers whatever the subform holds and reports out based on that. There is an output to excel method in there and a few other techniques all of which you can rip apart and learn from.

Regards

Jim
Sep 24 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

By using this site, you agree to our Privacy Policy and Terms of Use.