Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to create a report from unbound form values

Posted on 2016-11-09
5
Medium Priority
?
29 Views
Last Modified: 2016-11-11
Hi everyone,

I am using Microsoft Access 2016 on Windows 10.

I have an unbound form which gets data from various tables and queries and does calculations on that data.  The results of these calculations are then used to populate text boxes on the unbound form.  I would like to print this calculated data, from what I have read so far I think I should be creating a report and then printing that?  Assuming that creating a report for printing is the correct way to proceed (if there is a better way, suggestions gratefully received)...

My question is, how do I create a report that is not based on a table or query, but instead uses selected values from my form.

Thank you in advance :)
0
Comment
Question by:Marie Floury
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 85

Assisted Solution

by:Scott McDaniel (Microsoft Access MVP - EE MVE )
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 500 total points
ID: 41880279
While I'm sure you could create a report with unbound data, it would be far simpler to just save the data to some object (a Table, or a Recordset) and then use that object to populate your data.
0
 
LVL 48

Assisted Solution

by:Dale Fye
Dale Fye earned 500 total points
ID: 41880309
You can print a form, although it is not generally done.  But if you want a report, then:

Open your form in design view, then click save as, give it a new name and select Report as object type.
0
 
LVL 39

Accepted Solution

by:
PatHartman earned 1000 total points
ID: 41880708
This sounds like a single page report.  You don't actually need to create a form.  Just open the report.  If you want both, You can print the form as long as you remove its background.  The problems with printing forms generally involve pagination, backgrounds that are colored, and subforms that don't paginate correctly.

If you go with both a form and a report, you can clone the form as Dale suggested and save it as a report or you can create unbound controls on the report that simply reference form fields from the open form as their control source.

=Forms!myform!fldA

I would use the latter technique because cloning the form means that you have two objects to change should you need to change any calculations.
0
 

Author Comment

by:Marie Floury
ID: 41880747
Hi everyone, thank you for the suggestions.  I work nights so I won't be able to look until later but I just wanted to let you know I have seen your comments and that I will be trying them out later. :)
0
 

Author Comment

by:Marie Floury
ID: 41881368
Ok, I am back to work!

It is just a single page report, in fact there are only 9 fields of data.  (See attached screenshot)
I am using a form as I have a command button used to initiate an import of a csv file, allowing the user to select the file and location.  Then use combo boxes to select the month and year used to query data from the csv and do a USD to EUR fx, calculate fees etc...

I have decided to launch the form from a "Print" button on the original form.
I saved my form as a report, but it was blank (may have been me clicking the wrong option, I am working in a French version of Access!).  Anyway, I added fields and set the Control Source to point to the original form and that works for the text boxes.  Unfortunately I can't seem to get the listbox to show data from my original form.  It is probably something silly but do you have any ideas as to what I could check to get this listbox to show my data?

Scott, I was also interesting in your suggestion, which if I understand is to bind my report to a table or dataset I create from my calculated data?  I don't think a table would work well as the number of columns and the data types are not the same?  I don't know much about datasets, would a dataset work well in this situation?

Thank you
ScreenShot.jpg
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question