473,385 Members | 1,766 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,385 software developers and data experts.

Should I Use Reports At All?

1,287 Expert 1GB
Currently, I have a Print button on each of my forms that sets the background color of the form and subforms to white, calls the print dialog with DoCmd.RunCommand acCmdPrint, then changes the backgrounds back. The forms are not bound to recordsets, I use code to find the record based on a combo box selection and fill in all the unbound fields and the source for the subform. So that way it only prints the one record. Is it bad to do this and should I be using reports somehow instead?
Nov 28 '08 #1
3 1176
Stewart Ross
2,545 Expert Mod 2GB
Hi Chip. If you are using unbound forms you must be filling the control values from VBA code you have written yourself; with no recordsource Access cannot use its recordsource binding to fill the controls for you. Whatever your reasons for this, there is no advantage to you in using an Access report for printing - as you have no suitable recordsource for your report you will simply have to use a set of unbound controls there too and fill their values in code all over again.

What you are doing at present may not be ideal but if it works for you why change it?

It would be so much simpler to use or create a proper recordsource for your form, however. Then you could use that recordsource for a simple Access report without all the work you are causing yourself right now...

The normal solution to what you are doing is to either use dynamic binding - where you set the recordsource of your form dynamically in response to the After Update event of your combo - or to apply a filter to the recordsource of your form again from the After Update event of your combo. Both of these approaches could be used with reports as well. Setting or filtering the recordsource dynamically allows the normal Access binding of controls - much more efficiently and effectively than doing this task in VBA yourself.

-Stewart
Nov 28 '08 #2
missinglinq
3,532 Expert 2GB
@ChipR
If your only reason for doing all this with an unbound form is so that you can print a single record at a time, you're going to a great deal of unnecessary trouble! You certainly can print a report of a single record with a bound form.

Linq ;0)>
Nov 29 '08 #3
ChipR
1,287 Expert 1GB
I had a bunch of unbound fields that I calculated in my On Current event, because when I wrote functions in the source of the text boxes, it was very very slow. So I had most of the form filled out by code already, and just switched it to unbound and filled in the rest when I wanted to set up printing.

I did finally try out a report and I found the Group function is what I needed and couldn't do with subforms in continous forms. I will definitely be using reports in the future.

Thank you for the answers!
Dec 1 '08 #4

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

Similar topics

2
by: Andrew | last post by:
Hi there: I can successfully control a report's GroupLevel ControlSource property by using: ..Reports!rptEESTMT_A.GroupLevel(i).ControlSource = "CorpName" where rptEESTMT_A is the actual...
1
by: KEVIN97810 | last post by:
Hello to all, I am trying to fill all my reports in a listbox but I may not need to show other reports. How do you modify this function to do that. I have losts of reports but don't want to...
7
by: Sink | last post by:
Hi, Looking at reporting tools and was wondering if anyone else has gone thru this. Crystal seems rediculously expensive once you take into account licensing, while Active is runtime-free meaning...
17
by: Peter Proost | last post by:
Hi Group, I've got an interesting problem, I don't know if this is the right group but I think so because everything I've read about it so far says it's a .net problem. Here's the problem, we're...
3
by: VMI | last post by:
I know this may not be the best NG for this, but I feel you guys know more about this than any of the other NGs. I need to build several simple reports (over 50 of them and they get their data...
2
by: Rod | last post by:
We've got an old VB6 application which has 9 Crystal Reports it can print. These 9 reports are considered by our users to be in essence one "report", in the sense that they are all related and they...
3
by: joelpollock | last post by:
I'm having trouble continuously page numbering a large report in MS Access. The report is made up of three separate Access reports which I join together at the end. In the past I have opened the...
12
by: kabradley | last post by:
Hello, Thanks for looking at my post and hopefully having an answer or at least a suggestion to my problem. I currently work at a financial planning office that deals with many clients and accounts....
7
by: google | last post by:
I am trying to automate the way reports are printed in an Access 2003 database - I have ~200 records (people) who require between 5 and 10 customized reports (depending on values within certain...
1
by: =?Utf-8?B?Q2lhcmFuIE8nJ0Rvbm5lbGw=?= | last post by:
On reflection, you could possibly make the app a self extracting zip file which extracts the EXE and a settings file and then starts the app, then when you app closes, it can repack the settings...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
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,...

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.