IT SOLUTIONS
Your full service technology partner! 
-Collapse +Expand
Access
Search Access Group:

Advanced
-Collapse +Expand Access To/From
To/FromCODEGuides
-Collapse +Expand Access Store
PRESTWOODSTORE

Prestwood eMagazine

December Edition
Subscribe now! It's Free!
Enter your email:

   ► MB LobbyMicrosoft Access BoardAccess VBA Programming Topic   Print This     

checkbox - a simple problem

checkbox - a simple problem in Access VBA Programming topic (part of our Microsoft Access group).

Quick Search: checkbox   problem   checkbox simple   checkbox simple problem  
iceneweb
 (Inactive)
Vancouver, BC, Canada
Hi there,

Here's my goal:
When a checkbox is checked, the 'paid' field is automatically copied from the 'extended price' field.

Here's my code:
Private Sub PaidCheckBox_AfterUpdate(

If Forms!frm_invoice!frm_orders!frm_order_details!PaidCheckBox = True Then

Forms!frm_invoice!frm_orders!frm_order_details!DetailPaid =

Forms!frm_invoice!frm_orders!frm_order_details!Quantity

End If
End Sub

I don't get an error message, but it's not doing what i ask it to either.

Any ideas?

Thanks,
Mark
 Posted 20 years ago (Thread Starter)
Comment Quote
About iceneweb -Collapse +Expand
Visit Profile
Inactive member.
Member does not subscribe to this thread.
Email Not Verified!
Once email is verified, we will review and approve the account.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #1345, 3 replies
Thread Started 3/12/2001 9:10:00 PM
View Counter=1431
Last Reply Posted 4/18/2001 3:08:00 PM)
Location=Vancouver, BC, Canada  
Joined=20 years ago   MB Posts=6  
Most Recent Post
ScottCybak
 (Inactive)
Windsor, Ontario, Canada
It's probably because of your reference.

remember, if you have a sub form saved as "frmSubOfMain", and on the main form you inserted the sub, yet named it "SubForm", your reference to a control in it won't be the same.

A subform/report acts just like a control on a form/report, it's control source is the underlying form and you can define it a different name.

So, regards to my first example, to reference a control on the main form...

Forms![MainFormName]![SubForm]!ControlName

NOT, Forms![MainFormName]![frmSubOfMain]!ControlName

HTH
 Posted 20 years ago
Comment Quote
About ScottCybak -Collapse +Expand
Visit Profile
Inactive member.
Member does not subscribe to this thread.
Email Not Verified!
Once email is verified, we will review and approve the account.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #1781 (Level 1.1)  Reply to 1345
Thread Started 4/18/2001 3:08:00 PM
View Counter=2
Location=Windsor, Ontario, Canada  
Joined=20 years ago   MB Posts=64  
iceneweb
 (Inactive)
Vancouver, BC, Canada
Sorry, the code should read:

Private Sub PaidCheckBox_AfterUpdate()

If Forms!frm_invoice!frm_orders!frm_order_details!PaidCheckBox = True Then

Forms!frm_invoice!frm_orders!frm_order_details!DetailPaid =

Forms!frm_invoice!frm_orders!frm_order_details!ExtendedPrice

End If
End Sub
 Posted 20 years ago (Thread Starter)
Comment Quote
About iceneweb -Collapse +Expand
Visit Profile
Inactive member.
Member does not subscribe to this thread.
Email Not Verified!
Once email is verified, we will review and approve the account.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #1346 (Level 1.2)  Reply to 1345
Reply Posted 3/12/2001 9:37:00 PM
Location=Vancouver, BC, Canada  
Joined=20 years ago   MB Posts=6  
Daniel Fought
Prestwood IT
Home office in Fresno, CA.
can you stick a msgbox in the event and display the value of the extended price?

Dan Fought
Senior Programmer Analyst
Prestwood IT Solutions
http://www.prestwood.com

 Posted 20 years ago
Comment Quote
About Daniel Fought -Collapse +Expand
Visit Profile
Approved member.
Member subscribes to this thread with a verified email.
About Daniel Fought
Danial Fought is a senior programmer analyst with Prestwood IT where he develops custom Windows software and custom websites. When Dan is not coding for clients, he participates in this online community. Coding specialties include Paradox/ObjectPAL, MS Access, Visual Basic, and VS.Net/VB.Net.

Post ID #1373 (Level 1.3)  Reply to 1345
Reply Posted 3/14/2001 8:42:00 AM
Location=Home office in Fresno, CA. 
Joined=19 years ago   MB Posts=401   KB Posts=12   KB Comments=4  

Revive Thread!

Add a comment to revive this old thread and make this archived thread more useful.

Write a Comment...
Full Editor
...
Sign in...

If you are a member, Sign In. Or, you can Create a Free account now.


Anonymous Post (text-only, no HTML):

Enter your name and security key.

Your Name:
Security key = P195A1
Enter key:
Icon: A Post    Thread    Idea    Important!    Cool    Sad    No    Yes    Includes a Link...   
Thread #1345 Counter
1431
Since 4/2/2008
Go ahead!   Use Us! Call: 916-726-5675  Or visit our new sales site: 
www.prestwood.com


©1995-2021 Prestwood IT Solutions.   [Security & Privacy]