Some Records Blank on Report Only (1 Viewer)

ErickaMeade

Registered User.
Local time
Yesterday, 21:13
Joined
May 26, 2014
Messages
10
I have an Access Database that I use to keep track of open projects with 2 subforms. One for contacts for the project and another for invoices for the project. On this form I have a print button that prints the current record in a summary report that I place as a hard copy in the physical folder. This has been working wonderfully.

Lately, I have been coming across, seemingly random, some records are not showing any information on the report that is filtered to the current record ID. I have tried to run the report alone to run without a filter and these blank records are in the body of the report between many records that are showing just the way they should. I have even run the report after having added an additional record with only one field entered to make sure that it wasn't a null field that was forcing the fields to remain blank. The single field record showed in the report as it was supposed to.

Why in a report would one record show and not the next?
 

sneuberg

AWF VIP
Local time
Yesterday, 21:13
Joined
Oct 17, 2014
Messages
3,506
How is the report filtered. Is it a where condition something like "[ID] = " & Me.ID shown in the example open report statement below

Code:
DoCmd.OpenReport "Report Name", acViewReport, , "[ID] = " & Me.ID

If it's filtered that way you could be debug.print like
Code:
Debug.Print "[ID] = " & Me.ID

before the open statement to see what it's filtering on. Or just upload your database so we can see what's wrong.
 

ErickaMeade

Registered User.
Local time
Yesterday, 21:13
Joined
May 26, 2014
Messages
10
I am using a macro for the print and Email button (both use the same report) on the form that filters it by [ID]. I have attached a snapshot of the macro but it does this on an unfiltered report as well. I ran it unfiltered to see if it the problem was with my filter but only about 6 records are blank of a hundred. I even thought that perhaps if one of the fields on the record was blank that maybe it performed some unknown function that I could hunt down and repair but like I said I did a test record with only one field entry and I could not duplicate the problem to find the problem. I even deleted the record that was printing blank on the report and re-entered it and it still came up blank. What are some possible reason it would do this. I was trying to make a copy of the database but the copy wants to lock up. I can't attach a database with records due to confidential information on it.
 

Attachments

  • Capture.PNG
    Capture.PNG
    17.7 KB · Views: 112

ErickaMeade

Registered User.
Local time
Yesterday, 21:13
Joined
May 26, 2014
Messages
10
In an effort to delete the records to share the database, I found the root cause of my problem. I have as I said a form with two subforms and one of those subforms list invoice details. During my initial build I made the amateur decision to link the tables by [project_title]. After starting to use the database actively, to continue the build and work out kinks, I realized the error of my ways and changed the relationship of the tables to [ID]. This change caused my field [project_title] on the invoice_detail table to remain blank on new record entries. The ones before the change have it filled already and print in report just fine but the ones after the change do not.

Asking for help forced me to view my work in a different light and exposed my problem. Thank you for your help.
 

Users who are viewing this thread

Top Bottom