Form as a screen report

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a form that I have made into a screen report (continuous form) that
has entries from two tables. One table is primary data and the other table
(many to one relationship with primary table) with secondary data. This
report is based on a query with the parameters specified by tha user on a
separate form. When I run the form I, of course, get the data from the
primary table repeated for each row that has a selection in the secondary
table. I want to display the primary data only once and the secondary data
each time.

In other words, if the primary data is P1, P2, P3 and the secondary data is
S1 and S2 I currently get the following:

P1data1 P2data1 P3data1 S1data1 S2data1
P1data1 P2data1 P3data1 S1data2 S2data2
P1data1 P2data1 P3data1 S1data3 S2data3
P1data2 P2data2 P3data2 S1data4 S2data4
P1data2 P2data2 P3data2 S1data5 S2data5
P1data2 P2data2 P3data2 S1data6 S2data6

What i want to see is:
P1data1 P2data1 P3data1 S1data1 S2data1
S1data2 S2data2
S1data3 S2data3
P1data2 P2data2 P3data2 S1data4 S2data4
S1data5 S2data5
S1data6 S2data6

Is there any way to do this?

Traveler
 
traveler said:
I have a form that I have made into a screen report (continuous form) that
has entries from two tables. One table is primary data and the other table
(many to one relationship with primary table) with secondary data. This
report is based on a query with the parameters specified by tha user on a
separate form. When I run the form I, of course, get the data from the
primary table repeated for each row that has a selection in the secondary
table. I want to display the primary data only once and the secondary data
each time.

In other words, if the primary data is P1, P2, P3 and the secondary data is
S1 and S2 I currently get the following:

P1data1 P2data1 P3data1 S1data1 S2data1
P1data1 P2data1 P3data1 S1data2 S2data2
P1data1 P2data1 P3data1 S1data3 S2data3
P1data2 P2data2 P3data2 S1data4 S2data4
P1data2 P2data2 P3data2 S1data5 S2data5
P1data2 P2data2 P3data2 S1data6 S2data6

What i want to see is:
P1data1 P2data1 P3data1 S1data1 S2data1
S1data2 S2data2
S1data3 S2data3
P1data2 P2data2 P3data2 S1data4 S2data4
S1data5 S2data5
S1data6 S2data6

Is there any way to do this?

Traveler

The standard answer here is "No". But, if you're bloody-minded enough, you
can do anything, by writing an awful lot of code (and I wouldn't even bother
trying this sort of exercise).

However, if you are simply wanting to display the data, you can use a real
Report, rather than a continuous form. Then you can set the Hide Duplicates
property for the primary data textboxes to Yes, and you'd see exactly what
you want. But you can only use a report to view data - if you need to edit
it, this won't work.

If you do need to edit the displayed data, then you must use a form (or edit
directly in the displayed query). Your data structure (in the tables, not
in the query) calls for the standard form-subform structure. BUT, you can't
put a subform into a continuous form. So, if you do need to edit the
displayed data, you can either use a single form with a subform, or live
with the multiple display since forms don't have the Hide Duplicates
capability for controls.

HTH,

Rob
 
Back
Top