473,503 Members | 3,884 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Check box help

51 New Member
Could someone help me with the code for a calculation
When I click on a check box I want to be able to insert a answer for state sales tax in a text box (txtSt1)

Check Box = (ckst1)
Text Box to calculate sales tax = (txtSt1) Pa state sales tax (.06)
Text Box that has total to be calculated = (txtTotalCost1)

NOTE: don't know if this makes a difference but (txttotalcost1) is a unbound calcuation not a bound source

thanks
Gary
Jul 12 '09 #1
3 1431
ADezii
8,834 Recognized Expert Expert
@GLEberts
In the AfterUpdate() Event of your Check Box:
Expand|Select|Wrap|Line Numbers
  1. Private Sub ckst1_AfterUpdate()
  2. Dim txtTC As TextBox
  3.  
  4. Set txtTC = Me![txtTotalCost1]
  5.  
  6. 'If the Check Box is Checked, and txtTotalCost contains a Value'
  7. 'And the Value in txtTotalCost is a Number, then proceed
  8. If Me![ckst1] And Not IsNull(txtTC) And IsNumeric(txtTC) Then
  9.   Me![txtSt1] = FormatNumber((txtTC * 0.06), 2)
  10. End If
  11. End Sub
Jul 12 '09 #2
GLEberts
51 New Member
thank you very much - worked like a champ!

i should of posted what i was using - would of won the most embarrassing code award. - although could of given you a chuckle. (smile)

thanks again
Gary
Jul 12 '09 #3
ADezii
8,834 Recognized Expert Expert
@GLEberts
Always glad to help out, Gary.
Jul 12 '09 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

17
2741
by: Dave Smithz | last post by:
Hi there, A PHP application I built has a section which lists a number of members to a club whose names each appear with a check box beside them that can be ticked. These check boxes are part...
1
1338
by: Mike | last post by:
Hi, I have a question about the Visual Studio .Net IDE, I am wondering if anybody has seen the same problem. The first problem is when I click on Help/Check for Update menu button, I get an...
2
3783
by: Bhupesh Naik | last post by:
This is a query regarding my problem to make a spell and grammar check possible in text area of a web page. We have aspx pages which are used to construct letters. The browser based screens...
1
4243
by: scprosportsman | last post by:
Please help guys, i am trying to set up a database here at work and im fairly new to access in terms of writing functions and queries and stuff. I have 2 different places on my design that will...
5
6840
by: mabond | last post by:
Hi Can't believe I've not been able to find the answer to this in the on-line help. I have a CheckedListBox which, via a timer control, is populated with the names of files in a network...
8
3906
by: Iona | last post by:
Hi Allan, I'm using a nifty piece of code you put on here some time back to do a duplicate entry check as below. I'm using to check for duplicate names. However I am getting an error message on...
2
1727
by: cpptutor2000 | last post by:
Could some PHP guru please help me? I have very standard PHP - MySQL application that reads in some data from a table and for each row, puts a check box at the start of the row. Now the check boxes...
13
1916
by: wireshark | last post by:
hi again... :) please help me,how to make a check button,so the user can check which one to delete...and how to implement it with "delete" selected check button? <? ...
3
1705
by: John Wright | last post by:
I have a VB program that will be generating documentation that will be stored for 60 years. This program really needs to have spell check and I read the post below on using spell check. I was...
0
7188
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7258
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7313
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
4987
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4663
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3156
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3146
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1489
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
720
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.