Solved: Access2007: report does not display all fields

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

NewbieButTrying

Thread Starter
Joined
Nov 16, 2011
Messages
5
Because form printing in Access prints out all records, I attempted to create a report first. The form on which the report is based has multiple subforms and many calculated fields, (which is why I was hoping to print the form itself). I added a routine to print the report as below:

Private Sub cmdPrintProposal_Click()
' Print out the report based on this form
'===================================================

Dim strWhere As String
If Me.Dirty Then 'Save any edits.
Me.Dirty = False
End If
If Me.NewRecord Then 'No information to print
MsgBox "Select a record to print"
Else
strWhere = "[company_ID] = " & Me.company_id
DoCmd.OpenReport "rptFrmProposedEvent", acViewPreview, , strWhere
End If
End Sub

On the bright side, it prints out the report with just the single record. Yeah. On the dark side, all the calculated fields at the bottom of the form are left blank (not 0, mind you, but blank). These are unbound fields...does the fact that they aren't bound preclude them from displaying on the report?

Thanks for any assistance.
 

Attachments

NewbieButTrying

Thread Starter
Joined
Nov 16, 2011
Messages
5
I built it directly from the form by selecting the form and doing a "save as" and "save object as" report. I wan't to avoid the need to build all the separate queries needed to get the underlying data.
 
Joined
Jul 29, 2001
Messages
21,334
You are probably correct as to why those fields are not printing out because they are unbound text fields. Basing a report on what is on what you have on the form displayed would be easy enough to accomplish and making reports do what you want it actually pretty easy.
 

NewbieButTrying

Thread Starter
Joined
Nov 16, 2011
Messages
5
Perhaps you could expand on how I could base the report on what is on the sample report included? It requires, for example, gathering recordsets of information from multiple tables, performing summations, performing calculations depending on the radio button selected, (discounts, etc) and then creating grand totals. With my limited experience, I did not find the process simple at all.
 
Joined
Jul 29, 2001
Messages
21,334
I am sure you already have the queries for what that form is based on and all you would have to do is create a report based on the query used in the main form and add sub reports based on the sub forms you also have on that form. You would fire off the report in the same way you are trying to do now using the companyID as the criteria.
 

NewbieButTrying

Thread Starter
Joined
Nov 16, 2011
Messages
5
Thanks, Rockn. Didn't realize (doh!) that you could use subreports in a similar fashion to subforms. All learning is good learning. Will do some reconfiguring.
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Staff online

Members online

Top