View and print report from subform (1 Viewer)

sm1810

New member
Local time
Today, 19:08
Joined
Apr 12, 2018
Messages
8
Hi,
I am a beginner learning Access as I go along.
I have created a simple database for internal use by my department.
The database will open to a navigation form with horizontal tabs, data gets entered on to each of the subforms on the main navigation form. The names of the subforms are, follow up day1, follow up day 2 etc.
I need to print the data that has been currently entered on to each subform. I have created a report. The field control is a text and not the primary key. Currently, using the below code shows the report, for the first entry of the record only, not the current entry which might be entry number 2 or 3 for the same record.
Any help is appreciated. Thanks
1584369462370.png
 

theDBguy

I’m here to help
Staff member
Local time
Today, 11:08
Joined
Oct 29, 2018
Messages
11,114
Hi. Welcome to AWF!

Is this code in the subform or the Navigation Form? Just curious...
 

sm1810

New member
Local time
Today, 19:08
Joined
Apr 12, 2018
Messages
8
A button on the subform. Thanks
 

theDBguy

I’m here to help
Staff member
Local time
Today, 11:08
Joined
Oct 29, 2018
Messages
11,114
A button on the subform. Thanks
And how is the subform linked to the main form, if at all? Otherwise, how many records does each hospitalno supposed to have?
 

sm1810

New member
Local time
Today, 19:08
Joined
Apr 12, 2018
Messages
8
To explain further. I have one table with patient details with primary key as 'Hospitalnumber'. The other table is 'maintable' which has a field called 'hospitalno' which is not the primary key. This main table has data for procedures and follow ups but the same patient can come for multiple procedures and multiple follow ups. The primary key is 'serial no' which has no significance in data collection and does not appear on the subform
Therefore my main form is 'navigation form', contains several subforms - 'procedure', 'follow up day 1', 'follow up day 2' etc.
I need to print the report which contains all the fields on the subform

Thanks for looking and hoping for some advice on how to go along.
 

sm1810

New member
Local time
Today, 19:08
Joined
Apr 12, 2018
Messages
8
And how is the subform linked to the main form, if at all? Otherwise, how many records does each hospitalno supposed to have?
The main form is a navigation form.. I used the navigation form wizard and dragged and dropped the other forms on it..
Am I understanding this right? Or have I misunderstood that a navigation form is not a main form
 

theDBguy

I’m here to help
Staff member
Local time
Today, 11:08
Joined
Oct 29, 2018
Messages
11,114
To explain further. I have one table with patient details with primary key as 'Hospitalnumber'. The other table is 'maintable' which has a field called 'hospitalno' which is not the primary key. This main table has data for procedures and follow ups but the same patient can come for multiple procedures and multiple follow ups. The primary key is 'serial no' which has no significance in data collection and does not appear on the subform
Therefore my main form is 'navigation form', contains several subforms - 'procedure', 'follow up day 1', 'follow up day 2' etc.
I need to print the report which contains all the fields on the subform

Thanks for looking and hoping for some advice on how to go along.
Hi. Are you able to post a demo version of your db with test data?
 

theDBguy

I’m here to help
Staff member
Local time
Today, 11:08
Joined
Oct 29, 2018
Messages
11,114
Sorry, how do I make a demo?
Thanks
Try making a copy of your db and remove any sensitive information and non-essential objects. Just make sure it has everything needed to demonstrate the problem.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top Bottom