473,386 Members | 1,621 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Automating when Checkboxes are checked

3
Hi Folks,

I'm new to the forum and have been searching in vain for a few days for a solution (in fact, I'm sure I've wasted more time than it actually would have taken were I to do this manually over the life of the database!!, but the boss said for me to do it, so...) . I even purchased a thick Access book to help with the issue. Access 2003 Bible

Here's the problem: I have four sets of 4 checkboxes that when all four in one set are checked, it updates another field with Levels 1,2,3,4 respectively. I have that box set up as a combobox.

I've used If...then...else and Select clauses, Beyond that, I'm beyond my element. It seems like I'm doing something small wrong.

Below is only a sample of what I've been doing. I figured if I can get one box to work, that would be a start. Unfortunately, that didn't work. I know it "should" be working but I can't for the life of me figure out why it isn't.

Private Sub BD_Level_Change()

Select Case BD_Level = "2"
Case Viable = "True"
Case Else: BD_Level = "1"

End Select

End Sub

Thanks, guys. This little issue has had me consumed for days.
Thanks.

Tenger
Jul 11 '07 #1
4 1247
Rabbit
12,516 Expert Mod 8TB
Hi Folks,

I'm new to the forum and have been searching in vain for a few days for a solution (in fact, I'm sure I've wasted more time than it actually would have taken were I to do this manually over the life of the database!!, but the boss said for me to do it, so...) . I even purchased a thick Access book to help with the issue. Access 2003 Bible

Here's the problem: I have four sets of 4 checkboxes that when all four in one set are checked, it updates another field with Levels 1,2,3,4 respectively. I have that box set up as a combobox.

I've used If...then...else and Select clauses, Beyond that, I'm beyond my element. It seems like I'm doing something small wrong.

Below is only a sample of what I've been doing. I figured if I can get one box to work, that would be a start. Unfortunately, that didn't work. I know it "should" be working but I can't for the life of me figure out why it isn't.

Private Sub BD_Level_Change()

Select Case BD_Level = "2"
Case Viable = "True"
Case Else: BD_Level = "1"

End Select

End Sub

Thanks, guys. This little issue has had me consumed for days.
Thanks.

Tenger
I think you're looking for
Expand|Select|Wrap|Line Numbers
  1. Private Sub Viable_Change()
  2.    Select Case Viable
  3.       Case True
  4.          BD_Level = 2
  5.       Case Else
  6.          BD_Level = 1
  7.    End Select
  8. End Sub
  9.  
Jul 11 '07 #2
tenger
3
I think you're looking for
Expand|Select|Wrap|Line Numbers
  1. Private Sub Viable_Change()
  2.    Select Case Viable
  3.       Case True
  4.          BD_Level = 2
  5.       Case Else
  6.          BD_Level = 1
  7.    End Select
  8. End Sub
  9.  

Thank you, Rabbit. I'll give it a whirl.
Jul 11 '07 #3
tenger
3
Thank you, Rabbit. I'll give it a whirl.
Rabbit,

Thanks again, by the way.

I just tried the code you sent (and other similar variations) but nothing. Any other thing you can suggest?

Tenger.
Jul 11 '07 #4
Rabbit
12,516 Expert Mod 8TB
I think you're looking for
Expand|Select|Wrap|Line Numbers
  1. Private Sub Viable_Change()
  2.    Select Case Viable
  3.       Case True
  4.          BD_Level = 2
  5.       Case Else
  6.          BD_Level = 1
  7.    End Select
  8. End Sub
  9.  
Try putting the code in the After Update event

My code made a few assumptions.
1) Viable is a checkbox that when checked will change the value of BD_Level
2) Viable and BD_Level are controls/fields on the same form/table
3) BD_Level is of a numeric data type

You'll also want to try:
1) Checking that everything is spelled correctly
2) Compiling the code
3) Checking all your references are there
Jul 11 '07 #5

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

Similar topics

9
by: Gary | last post by:
Hello, Is it possible to dynamically update a textbox with words chosen from a list using form checkboxes and javascript? Gary
5
by: Dave D. | last post by:
I have a total of 8 checkboxes, but the user is only allowed to check any three of them. After have been checked I have an alert box saying that only 3 boxes can be checked. I'm trying to get so...
3
by: David Gonneau | last post by:
I'm getting an incredible behaviour of internet explorer. I have a generated html page with one form and many input of checkbox type. Those checkbox are grouped in 4 lists and each list of...
5
by: @(none) | last post by:
I have a page which is a set of CheckBoxes generated daily and thus the number of Checkboxes changes each day. What I want to do is allow the user to select one or more checkboxes and the push a...
3
by: ewitkop90 | last post by:
Here is my code: <SCRIPT> function transportchange(transport) { if (framenewinstall.Helpdesk.checked) framenewinstall.Helpdesk.checked=false; if (framenewinstall.CircuitNumber.checked)...
1
by: Kevin R | last post by:
This is one of the weirdest problems I have ever run into. I have had to trim down a bunch of code to give a sample that is more easily readable by those who will view this. Here is the problem:...
6
by: jeffsnox | last post by:
Hi, I have multiple checkboxes on the same form as follows: <input type='checkbox' name='cbtype' value='1'> <input type='checkbox' name='cbtype' value='2'> <input type='checkbox'...
2
by: avanti | last post by:
Hi, I add rows to my table dynamically, with a checkbox in each row in the first column. The checkbox in the header row acts as a 'Select All' checkbox. Whenever it is checked, checkboxes in all...
3
sunbin
by: sunbin | last post by:
Hi, I am having in a Trouble when working with dynamic checkboxes (i.e. checkboxes with the same name, e.g. <input type="checkbox" name = "check" value="dynamic integer value">) I have...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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
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...

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.