mjcaestecker
Registered User.
- Local time
- Today, 12:02
- Joined
- Aug 17, 2012
- Messages
- 25
Greetings all,
First Post time! but there's a first time for everything.
I have a continuous subform (BooksFullSubCC) that is located on a tab in the main form (BooksFull). In BooksFullSubCC, there is a text box in the footer that sums up all the amounts of credit card charges to make a total with =Sum([Amount]). For some reason, I cannot pass the value from the text box to VBA or another text box on the main form because Access "cannot find the form"
Here's the code
Its really simple - Access should take the amount from the text box (CCchargesTotal) on the subform and then put it the result of some simple math into a text box on the other form.
When I try and change tabs to initiate the code, i get
"Run-time error '2450':
Microsoft Access cannot find the referenced form 'BooksFullSubCC'."
Any thoughts???
I've checked the spelling, rewritten the code, everything. I even tried to make a text box on the main form with control source =[Forms]![BooksFullSubCC]![CCchargesTotal] but that didnt work either... :banghead:
Cheers,
-Martin
First Post time! but there's a first time for everything.
I have a continuous subform (BooksFullSubCC) that is located on a tab in the main form (BooksFull). In BooksFullSubCC, there is a text box in the footer that sums up all the amounts of credit card charges to make a total with =Sum([Amount]). For some reason, I cannot pass the value from the text box to VBA or another text box on the main form because Access "cannot find the form"
Here's the code
Code:
Private Sub TabCtl93_Change()
Dim Amount As Currency
Amount = Nz(CCur(Forms!BooksFullSubCC!CCchargesTotal))
Me!CCFees = Amount * 0.015
End Sub
Its really simple - Access should take the amount from the text box (CCchargesTotal) on the subform and then put it the result of some simple math into a text box on the other form.
When I try and change tabs to initiate the code, i get
"Run-time error '2450':
Microsoft Access cannot find the referenced form 'BooksFullSubCC'."
Any thoughts???
I've checked the spelling, rewritten the code, everything. I even tried to make a text box on the main form with control source =[Forms]![BooksFullSubCC]![CCchargesTotal] but that didnt work either... :banghead:
Cheers,
-Martin