Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Same query but different relationships

Status
Not open for further replies.

Autoeng

Technical User
Jul 16, 2002
57
0
0
US
After making some changes to my db last week when I select to print a report it comes out blank. All of the report fields are there but there is no data shown in the corresponding text boxes. Control sources are correct. The report is created by pressing a command button from the only form in the db. Old records (ones created before Friday) print correctly but if you add information to them the new information does not print but old does! Form control source is a query that when run is not picking up the changes.

Created a new query to see if that would solve the problem but with no luck. Odd that when the relationships were displayed in the query window they were different than the original.

Original had: (this matches the relationships set for the db)
Maintbl - RecordID one to one with Detailtbl - RecordID
Maintbl - RecordID one to many with Subdetailtbl - RecordID

New has:
Maintbl - RecordID one to one with Detailtbl - RecordID (RI enforced)
Maintbl - RecordID one to many with Subdetailtbl - RecordID (RI enforced)
Detailtbl - RecordID one to one with Subdetailtbl - RecordID (RI not enforced)

This sounds like some sort of bug but has anyone seen it before and know how to get it working again?

Autoeng

 
It's not a bug. When you created the new query, Access automatically created the extra relationship (actually, it's a Join line) because of a feature called AutoJoin. AutoJoin is usually handy, but in this case it got in your way. Click on the extra join line and then press the Delete key to get rid of it. (You have to point carefully or you'll miss it. When you've selected it right, it will turn bold.)

That should make the new query just like the old one, which probably won't solve the problem, but your facts are confusing. First you said the report was blank, then you said the "old records" printed and "new records" didn't. Which is it?

Make sure you haven't accidentally left a Filter on the report that's eliminating all the data. If you saved it at some point while a filter was active, the filter got stored with the report. Just clear the Filter property and save the report again to get rid of it.

If none of this helps, try giving us some sample data from matching records, along with the report's Record Source property and any underlying query definitions. It would also help to know the primary keys of all tables involved. Rick Sprague
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top