New comer to Access/Report

jo-

Registered User.
Local time
Today, 00:32
Joined
Mar 21, 2002
Messages
12
I am new at this game, so please excuse my ignorance. I have a table that contains two types of records. Each record has a code to distinguish what it is. Those that are coded with the letter "L" should be printed on the left side of the report, and those that are coded with an "S" should be printed on the same line, but on the right side of the report. Does anyone have ideas on how I can make this happen?! I sure would be greatful to those of you who would like to take on this challenge...........thanx jo-

[This message has been edited by jo- (edited 03-21-2002).]
 
If the "S" records are linked to the "L" records, I really think you should have them in a separate table with a key value linking each one back to its "L" record. That said, there's probably a way to do what you want without doing that. One question - is there anything in the "S" record that makes it obvious which "L" record it's linked to - or are you just relying on the sequence of the data in the table? Also, does every "L" have an associated "S"?

If there is a linked field then create a query which just returns the "S" records. Create a second query using the original table and link this, in the query, to the first query containing the "S". Then output data from both the table and the query in a single record from the query and you can easily display both in a single line.

If there is no common field then try this:

Change the report layout to be multi-column (two columns) and create just one set of controls for output on the left of the report.

In the detail section's Format event, you'll need to keep track of the sequence of "L" and "S" records. When you get an "L" followed by an "S" all is well. If you can get an "L" followed by another "L" then you want to skip the right-hand column. You can do this using the report's MoveLayout method. Read up about this in the Access's help.

Simon
 
Why not use a crosstab query?
 

Users who are viewing this thread

Back
Top Bottom