Form does not show Total Value when printed (1 Viewer)

Niyiomojoh

Registered User.
Local time
Today, 22:55
Joined
Jan 3, 2019
Messages
10
my form included two tables - patient and Investigation.

When I try to print the form, it would cut off the Summation and instead insert the table header. But if I screenshot it would appear (fig3).

I need a help to be able to print the Total Amount whenever I print the form

I just started the MS Access journey.

View attachment Fig1.pdf

Fig2.JPG
 

June7

AWF VIP
Local time
Today, 13:55
Joined
Mar 9, 2014
Messages
5,470
Forms are intended for display and reports are intended for printing. Each can be made to do the other but not as well and not as easily.

Recommend you build a report.
 
Last edited:

isladogs

MVP / VIP
Local time
Today, 22:55
Joined
Jan 14, 2017
Messages
18,212
Forms are not intended for printing. Create a report instead
 

Niyiomojoh

Registered User.
Local time
Today, 22:55
Joined
Jan 3, 2019
Messages
10
Thanks guys for the reply. But how can I make the Total Amount appear for printing?
 

June7

AWF VIP
Local time
Today, 13:55
Joined
Mar 9, 2014
Messages
5,470
That total is not resulting from expression in textbox. It is not going to print.

Is that subform container using a table or form as SourceObject? If a form set for Datasheet, then create a textbox in its footer section with expression: =Sum([Cost]). Then another textbox on the main form that references the first textbox. And turn off the Totals summation.
 

Niyiomojoh

Registered User.
Local time
Today, 22:55
Joined
Jan 3, 2019
Messages
10
Thanks June7, the subform reference a table.

I observed that while the subform retain the text value of the drug column, the Table under the same column only shows Number. Kindly help.

I've attached the db. I appreciate in advance.
 

Attachments

  • Tables and Form.zip
    100.8 KB · Views: 42

June7

AWF VIP
Local time
Today, 13:55
Joined
Mar 9, 2014
Messages
5,470
No, the subform container references a form, not a table. Don't see any effort to do what I suggested. What do you not understand about suggestion?

The form shows drug name because it is a combobox with lookup. The table is supposed to show only the number because that is what is saved. Really should do the same with patients. This would require an ID field in Customers table.

Why no customer info controls on the main form?
 
Last edited:

Niyiomojoh

Registered User.
Local time
Today, 22:55
Joined
Jan 3, 2019
Messages
10
So, what can I do to rectify that. So that the column can show text and not Number? I need a help for this project.
 

June7

AWF VIP
Local time
Today, 13:55
Joined
Mar 9, 2014
Messages
5,470
Why do you need table to show text and not number? Build query to retrieve related data.

If you must show drug name in Drug Costing table (and I advise not to), then set the field Lookup properties in table. Set the Display Control property to Combobox.

Regardless, need to change the field type to number.

Perhaps I misunderstand what you want. If you really want save the drug name (again, not advised), then why do you have autonumber field set as primary key? Field designated as primary key is value that should be saved as foreign key.
 

Niyiomojoh

Registered User.
Local time
Today, 22:55
Joined
Jan 3, 2019
Messages
10
Thanks for your response.

The reason for wanting the drug to show text is because of the report. I'm trying to view a situation where in the report you actually know the particular drug sold.

In the attached report it shows number
 

Attachments

  • Report.pdf
    19 KB · Views: 35

Users who are viewing this thread

Top Bottom