473,320 Members | 1,951 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,320 software developers and data experts.

Add Record with checkbox

Hi, I have a form in access where a user will choose a "location" from a
list of check boxes. Those choices need to be entered into a text field
on a table called "Locations". I tried doing this through a Group
Options wizard but didnt' work. I did something similar in an Excel
Spreadsheet where a user clicks a checkbox and the preset value is input
into a cell. I included the code from that project below. how is this
differnt from what I am trying to do.

Private Sub CheckBox26_Click()
With CheckBox26
If .value="True" Then Range ("b13") .value ="200"
If .value="False" Then Range ("b13") .value ="0"
End With
End Sub
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 13 '05 #1
1 2115
In the checkbox control's AfterUpdate event, put:

If Me!checkbox="True" Then
Me!locations ="200"
Else
Me!locations ="0"
End If

-Ed


"Tee GEE" <e3******@hotmail.com> wrote in message
news:42**********@127.0.0.1...
Hi, I have a form in access where a user will choose a "location" from a
list of check boxes. Those choices need to be entered into a text field
on a table called "Locations". I tried doing this through a Group
Options wizard but didnt' work. I did something similar in an Excel
Spreadsheet where a user clicks a checkbox and the preset value is input
into a cell. I included the code from that project below. how is this
differnt from what I am trying to do.

Private Sub CheckBox26_Click()
With CheckBox26
If .value="True" Then Range ("b13") .value ="200"
If .value="False" Then Range ("b13") .value ="0"
End With
End Sub
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: CJM | last post by:
I have a problem more to do with style than ability; I can solve this problem in a number of ways, but I'm keen to find the best way of doing this... We have a facility on our intranet where...
0
by: D. Shane Fowlkes | last post by:
OK - I'm looking for the best approach on how to do this. I have a form page where the user can edit their "Profile" (data) which is in SQL Server. It's your basic company information - address,...
0
by: D. Shane Fowlkes | last post by:
OK - I'm looking for the best approach on how to do this. I have a form page where the user can edit their "Profile" (data) which is in SQL Server. It's your basic company information - address,...
1
by: Brian | last post by:
Hey all - I have a windows form (using VB) in which I display basic information about a person, all of which is housed (for now) in a single Access table, which I'll call "tblPerson". I would...
2
by: jaYPee | last post by:
i'm wondering how can i update the current record in datagrid while still editing the record. cause i have a checkbox in my datagrid and i want to save the record before changing the value of this...
0
by: uthooker | last post by:
I have an Access form with some combo boxes in the Form Header that are enabled/disabled using conditional formatting based on the setting in a checkbox also in the Header (Combo box = Enabled by...
1
by: chocciies | last post by:
Hi! I want to delete multiple record via checkboxes. However, with no success. Is there sthg wrong with the value of my checkbox? Your help will be greatly appreciated. Thanks! <form...
6
by: mukeshrasm | last post by:
Hi I want to update records in database based on selected records using checkbox. if user does not select a record and clicks update button it should show the message please select record to be...
7
by: ggfota | last post by:
I have problem creating Access (Continuous) Form with indepenent CheckBox for each record. The user should be able to select records that will be processed by VBA based on ChceckBox value. When I...
1
by: mrsgwen90 | last post by:
I have a form in access that lets the user enter data. The data is information taken over the phone from a caller about someone who has committed a liter violation. Once the data has been entered...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.