473,729 Members | 2,235 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Subform -> Report

2 New Member
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 1989
thsoundman
2 New Member
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 Recognized Expert Contributor
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

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

Similar topics

25
10255
by: Lyn | last post by:
Hi, I am working on a genealogy form. The only table (so far) lists everybody in the family, one record per person. Each record has an autonum ID. The parent form (frmMainForm) displays the data in each record, which includes the ID of the father and the mother (who also have records in the table). One record per form. I have a Tab Control in the form, and in one of the tabs I have a subform (sfmSiblings) in which I wish to list...
1
8509
by: John Michael | last post by:
I have a form that has a subform that has a subform. The subform loads a record based on a combo lookup box in the main form. I'm trying to set a value in the subform based on a value in a subform of the subform. the main Form is called Subform is called Subform in the subform is called
4
7017
by: Dave Boyd | last post by:
Hi, I have two very similar forms each with a subform. The main form gets a few fields from the user and passes this back to a query that the subform is bound to. The requery is done when the user enters the last qualifying field on the main form. In one case this works fine, the subform shows the data the user wants to update -- which means showing all the data put in previously (ie showing this via the requery and the continuous...
6
5975
by: DMUM via AccessMonster.com | last post by:
Hello I am trying to pass the name of my subform to a function/sub but I can't seem to get it to work. I am using an autokey function (ctrl E) to unlock text boxes on a subform. I have a few forms in the database that will use this function, so I need to be able to tell the code which form to unlock. What I have is as follows: Public Function akeyEdit()
4
8848
by: Macbane | last post by:
Hi, I have a 'main' form called frmIssues which has a subform control (named linkIssuesDrug) containing the subform sfrmLink_Issues_Drugs. A control button on the main form opens a pop-up form which allows me to edit the record in the subform. What I want to happen is for subform with the new edits to be updated on the main form when I close the popup. I'm sure this is a very small bit of code in the the 'On close' event for the popup...
0
8763
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9428
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9286
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8155
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6026
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4529
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4797
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2689
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2165
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.