473,406 Members | 2,371 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Create report based on dynamic query from a select field form

How do I create a dynamic report based on a query that updates from a select field form? I followed the information from the article here entitled: "Checkbox form to allow user to select query output fields". I wish to have the Switchboard run the report after I have used the select field form to generate the results. Is this possible, and if not, is there a way to create a report template which can be applied to the query results of the field select form?
Apr 12 '12 #1

✓ answered by limweizhong

If you are dynamically generating reports, there might be a way to use the in-built Access commands to make the form (form wizard but with parameters specified automatically), and apply themes to it (in Access 2007). But you will need to refer to the MSDN documentation. I don't know enough to help you there, sorry.

8 6827
Use a reference to the control in the form in the query itself, e.g. in the criteria row, put something like forms.form1.text0 where form1 and text0 are the form name and field name respectively.
Apr 13 '12 #2
Thank you for your suggestion.
In terms of a dynamic report generated based on a custom layout using fields from the query. How is this accomplished with your suggestion? Please elaborate...
Apr 13 '12 #3
Assume you have the original query in Query1. You don't put that in the RecordSource of the Report. You first create another query, say Query2, and inside that query, you do the appropriate filters with the reference to the control in the form, say Forms.Form1.Text1. When you have the form open, and run the query, you can see if it works. Then you set the RecordSource of the Report to Query2. Or you could copy the SQL of Query2 into the RecordSource.
Apr 14 '12 #4
I followed your instructions, however, the report remains blank.

The second query does match the first and I have set the recordsource of the report to the sql from the second query namely:

SELECT CRF_Fields1.*
FROM CRF_Fields1;

The report remains blank.

The second query does retain the selected fields from the first.

Do you have any suggestions?
Apr 14 '12 #5
Okay, this is not what I need and now see what you were mentioning.

I took a current report with custom graphics, layout and fonts.

Removed all the selected fields and set the recordsource to the query expecting the report to populate with all the fields using the wildcard "*".

Excuse my ignorance, however, is there a way that a report can be created to dynamically update the fields from a variable query without having to edit the report each time?

In other words, while everything else works, I need the report to be generated from the varying results of the query which is updated from the field selector form which I gratefully found on this website recently?

I trust what I have described is clear enough...

Please advise me...
Apr 14 '12 #6
That might be do-able with a macro, but it all depends on how you want the report to be laid out. If you have a fixed *number* of columns, then you might just put the text-boxes all laid out nicely, then dynamically change the ControlSource to the right field name using a macro that runs when the report loads. Otherwise, you must have a macro somewhere else, that dynamically changes the report *design*, and then opens the report with the new design.

However, all these really requires knowledge of VBA programming.
Apr 15 '12 #7
Alternately, would it be possible to create a template look and feel so each Report generated is based on the same graphics and layout?
Apr 15 '12 #8
If you are dynamically generating reports, there might be a way to use the in-built Access commands to make the form (form wizard but with parameters specified automatically), and apply themes to it (in Access 2007). But you will need to refer to the MSDN documentation. I don't know enough to help you there, sorry.
Apr 15 '12 #9

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

Similar topics

8
by: Donna Sabol | last post by:
First, I should start by saying I am creating a database to be used by some very impatient, non-computer literate people. It needs to be seameless in it's operation from their point of view. I...
2
by: CindySue | last post by:
Hello--I've got a query that uses DatePart("m",) to select records for a particular month, and then a report based on that query. I'd like to be able to create a field in the report that says what...
2
by: sandeepsandeep | last post by:
Hellow i am facing a problem in mysql query plesae solve it. I have a table Team_master with two field 1. team_id 2. team_name
2
by: devindersingh1984 | last post by:
hello sir i am making a project in ms access it is having two tables that is interrelated with primary key. i want to get report of current record means report should take data from both tables....
3
by: Apple001 | last post by:
I am having hard time finding the way to make the database below. I have: -Form "frmInvoice" with subform "Allocation" based on table "tblInvoice" and "tblAllocation". "invID" is auto number in...
3
by: NMarks | last post by:
Hello, I currently have a continous form that has a search field in the header. The search works without issue, but I want to be able to print a report based off the search results. All the...
0
by: ramseyscripts | last post by:
I have Table A that is displayed through a form. Table A can be filtered through the form to create a subset of Table A records. How can I create a new table, Table B, with only the records in the...
1
by: mfaisalwarraich | last post by:
Hi Everybody, I have an external database called Patients.mdb where i made a query called qryAdmissionDetails. now i want to run this query on a report of another database called...
5
by: theine | last post by:
How do I create Hyperlink based of a specific field in the same row? In Excel it done like this: =HYPERLINK("", A273) where the anything inside the " " is the value it's looking for in that...
1
by: JohnHo | last post by:
why won't this work? I have a form which has a text box: forms!frmCaseLog!tboCaseID the RecordSource for the form is tblCaseLog with the field I would like to print a report with details...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.