-
WSJenniferS
AskWoody LoungerSo how do I remedy this? How can I show the payments on the invoice without joining them?
-
WSJenniferS
AskWoody LoungerI’m a bit confused. I’m not sure how to do a “pop-up” window for each line in the invoice. I gathered from your post that I should add a field to my Invoice Details table to make an individual number for each record. So I added a field called “LineNo” to the Invoice Details table and made that the primary key. I then made another table called Applied that has the fields: LineNo, InvID, and Applied. Now I’m not sure where to go from there. I have my Payments form that has the fields from the Payment table (StudID, Date, Payment amount, ChequeNo, Notes, and check boxes for cheque or cash. I got rid of the subform that I had there. So do I make another subform?
Im just not sure what to do next. Thanks for your help.
-
WSJenniferS
AskWoody LoungerI have a Student table and an Invoice table that just shows the invoice #, Student ID#, and date of the invoice, then there is an InvoiceDetails table that shows each line of the invoice (invoice #, type of fee (e.g. elementary, Jr high, etc.), and the amount of the fee). All these tables are linked to the Student table. Then I have a Payment table that has a payment # automatically assigned, Student ID#, date of payment, payment amount, cheque #, Notes, and check boxes for whether its a cheque or cash. This table is linked to the Student table.
I then want to have it so that when I enter a payment and it goes to the Payment form, it has a button to apply the payment. It then goes to the Apply form and shows the invoice line by line and you enter the amount of the payment you are applying to which line. E.G. If a student pays $10, and has an Elementary fee of $35 and a Local Levy of $5–you can apply $5 to the Local Levy and $5 to the Elementary fee. Then when you have another payment of, lets say, $15–you will see the amount remaining of each line of the invoice, and then be able to apply that next payment.
I hope you can understand what I’m trying to do. Maybe I’m even making it more complicated that I need to. If you can suggest another way to do it, I would appreciate any help.
Thanks,
Jennifer -
WSJenniferS
AskWoody LoungerWell, I tried what you said, but I still can’t get it to work. Here is the code I used:
Private Sub cmdPrintReceipt_Click()
On Error GoTo Err_cmdPrintReceipt_ClickDim stDocName As String
stDocName = “Payment”
DoCmd.OpenReport stDocName, acPreview, , “PaymentID=” & “PaymentID”
Exit_cmdPrintReceipt_Click:
Exit SubErr_cmdPrintReceipt_Click:
MsgBox Err.Description
Resume Exit_cmdPrintReceipt_ClickEnd Sub
PaymentID is my field name, and the name I gave the control in the Payments form. But it still doesn’t work. If I have to give the control a different name, where do I go to change that? I tried giving it a different name in the Payments form, but it just asks for a parameter of txtPaymentID when I pressed the “Print Receipt” button. So I assume you have to go to some other places to change it, but I’m not sure where.
Jen
-
WSJenniferS
AskWoody LoungerI figured it out! I had the wrong data put in the Control Source of the StudID box on the Invoices form. I had [forms]![frmInvoices by Student]![StudID] in the Control Source. So I switched it and put it in the Default Value property. I hope that’s right. And I changed the Control Source to StudID. I do need that code in the Default property, right? If I don’t, it doesn’t work.
Jen
-
WSJenniferS
AskWoody LoungerIt didn’t work. I even went back and started again. I built the Student main form with a linked form that comes from the Invoices table. I then put a subform in the Invoices linked form to go to the Invoice Details. But I still can’t see the invoices on the screen.
-
WSJenniferS
AskWoody LoungerI linked it using InvID in the child and master. Is that where I went wrong? Should I use the StudID for this?
-
WSJenniferS
AskWoody LoungerNope. The Data Entry property on both the Invoice Details form and subform are set on “No”.
-
WSJenniferS
AskWoody LoungerDo I have to pull in the Payments table to total up the payments? If not, I can’t seem to get it to total up the payments. I used the following code in the control of Total Payments:
=[Forms]![frmPayments]![Payment]
It just shows a “#Name?” where the total payment amount should be. What am I doing wrong?
Jen
-
WSJenniferS
AskWoody LoungerThis still doesn’t solve my problem. I still can’t add up the payments. Did I link the tables together incorrectly?
Jen
-
WSJenniferS
AskWoody LoungerI have a separate table for payments. I have a Student table, Invoice table, Invoice Detail table, and a payment table. I have joined the Payment table to the Invoice table by way of One-to-many (Invoice table to Payment table). Is this maybe the problem?
Jen
-
WSJenniferS
AskWoody LoungerOkay, Charlotte! I finally got it to work! I just put in a “Current Form” before the print preview part of the code.
Jen
-
WSJenniferS
AskWoody LoungerI have the report pulling from a query. Is that the problem? Anyway, I’ve attached the database. If you have any other suggestions, I would greatly appreciate it. Thanks, Charlotte!
Ooooops! I can’t get the database file smaller that 346K (it has to be under 100K). Let me know what I should do.
Jen
-
WSJenniferS
AskWoody LoungerBoy, this is frustrating. It’s still not working. Is it because I have a Subform in the Invoice form? I have a Form with invInvID in the top section, and invdetInvID in the Subform. But I tried changing it to [invdetInvID] and it just gave me a run time error that it couldn’t find that field. Do you know what I’m doing wrong?
Jen
-
WSJenniferS
AskWoody LoungerWell, I changed all of them but I am still having trouble. Here’s the line again.
.Filter = “[InvID]=” & [invInvID] & “”
The first “[InvID]=” is that suppose to be the field name in the report? And the second “[invInvID]” suppose to be the control source of the InvID field in the Invoice form?
Jen
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
Speeding up 11’s search
by
Susan Bradley
3 hours, 43 minutes ago -
HP Pavilion Will Not Wake Up After Being Idle for Longer Period
by
WSwalterwood44
3 hours, 1 minute ago -
Make a Windows 11 Local Account Passwordless
by
Drcard:))
6 hours, 28 minutes ago -
Ubuntu 25.04 (Plucky Puffin)
by
Alex5723
14 hours, 1 minute ago -
24H2 fixed??
by
CWBillow
3 hours, 31 minutes ago -
Uninstalr Updates
by
jv16
19 hours, 10 minutes ago -
Apple zero days for April
by
Susan Bradley
1 day ago -
CVE program gets last-minute funding from CISA – and maybe a new home
by
Nibbled To Death By Ducks
1 day, 6 hours ago -
Whistleblower describes DOGE IT dept rumpus at America’s labor watchdog
by
Nibbled To Death By Ducks
1 day, 17 hours ago -
Seeing BSOD’s on 24H2?
by
Susan Bradley
1 day ago -
TUT For Private Llama LLM, Local Installation and Isolated from the Internet.
by
bbearren
1 day, 8 hours ago -
Upgrade from Windows 10 to 11
by
Holdsworth8
2 days, 2 hours ago -
Microsoft : AI-powered deception: Emerging fraud threats and countermeasures
by
Alex5723
2 days, 5 hours ago -
0patch
by
WSjcgc50
1 day, 6 hours ago -
Devices might encounter blue screen exception with the recent Windows updates
by
Susan Bradley
1 day, 22 hours ago -
Windows 11 Insider Preview Build 22631.5261 (23H2) released to Release Preview
by
joep517
2 days, 8 hours ago -
Problem opening image attachments
by
RobertG
2 days, 9 hours ago -
advice for setting up a new windows computer
by
routtco1001
3 days ago -
It’s Identity Theft Day!
by
Susan Bradley
2 hours, 22 minutes ago -
Android 15 require minimum 32GB of storage
by
Alex5723
3 days, 5 hours ago -
Mac Mini 2018, iPhone 6s 2015 Are Now Vintage
by
Alex5723
3 days, 5 hours ago -
Hertz says hackers stole customer credit card and driver’s license data
by
Alex5723
3 days, 6 hours ago -
Firefox became sluggish
by
Rick Corbett
22 hours, 31 minutes ago -
Windows 10 Build 19045.5794 (22H2) to Release Preview Channel
by
joep517
3 days, 10 hours ago -
Windows 11 Insider Preview Build 22635.5235 (23H2) released to BETA
by
joep517
3 days, 10 hours ago -
A Funny Thing Happened on the Way to the Forum
by
bbearren
2 days, 7 hours ago -
Download speeds only 0.3Mbps after 24H2 upgrade on WiFi and Ethernet
by
John
4 hours, 14 minutes ago -
T-Mobile 5G Wireless Internet
by
WSmmi16
2 days, 8 hours ago -
Clock missing above calendar in Windows 10
by
WSCape Sand
9 hours, 56 minutes ago -
Formula to Calculate Q1, Q2, Q3, or Q4 of the Year?
by
WSJon5
4 days, 1 hour ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.