View Full Version : Subform question


Peter Paul
03-21-2000, 02:37 PM
I am building a report database, and have a problem. I am attempting to make the forms and reports look as close to the existing paper versions as possible to make life easier and more comfortable for my technologically challenged users. The form used for motor vehicle accident reports, has two columns used for showing involved vehicles. The top field is the UNIT #, to indicate which vehicle is being referenced.

The data structure is exactly the same for both. In trying to create a nice smooth database, I created a separate table with the required fields, and in the form created two subforms off of that table. They need to be side by side.

My problem is this. I need to show consecutive records on the two subforms, i.e. Unit #1 on the left, Unit #2 on the right. Right now when I open the form, both subforms show the first record for the report #. I tried some expresions on the second subform, such as =[table].[ID]+1 etc, but can't get the second subform to display the proper record.

Any help would be much appreciated.

Peter

Carol
03-21-2000, 03:43 PM
Is your main form opening for new records only, or is it showing all records and how is the user able to manipulate through these records. You would have to have two main fields, Unit 1 which would then open up subform #1 with the related fields and another main field, Unit 2 which would then open up subform #2 with the related fields. Unit 2 would have to be related to Unit 1 also. Is everything tied together with a related key, such as IncidentID to link the parent and child fields together.

[This message has been edited by Carol (edited 03-21-2000).]

Peter Paul
03-21-2000, 03:56 PM
The form will be opening only for new records. I follow what you are suggesting so far but.. the Unit Number can change. If there are more than two vehicles involved, then Unit # will be 3, 4 etc., and the user would use a second form.

I am thinking, though, about changing the layout to make my life easier. Rangers can be trained.....

Peter

Carol
03-22-2000, 02:32 AM
Maybe another solution would be to look at having a main form with the information that is relative to the acident and then have a subform that allows for multiple entries listing the various units involved. That way you are not limited to just a few units. This subform would be best to be viewed as a datasheet with an incidentID as your main primary on a relationship of one to many. Just a suggestion.