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

Linking checkboxes to a table

50
Hi there

I am a relative novice to VB within Access so bare with me, I hope you can help...

I have a form linked to a table on which I have 4 check boxes. The check boxes, when ticked put a '-1' value in the relevant field and a '0' if not. This I understand.

I have another form however, not bound to a table. On this form I would like 4 tick boxes, but only make them 'enabled' if they are ticked on the other form (there is a '-1' in the table). I would put this code into an 'on open' of this form.

Excuse my basic descriptions, as i say... relative novice!
Dec 13 '07 #1
2 1393
puppydogbuddy
1,923 Expert 1GB
Hi there

I am a relative novice to VB within Access so bare with me, I hope you can help...

I have a form linked to a table on which I have 4 check boxes. The check boxes, when ticked put a '-1' value in the relevant field and a '0' if not. This I understand.

I have another form however, not bound to a table. On this form I would like 4 tick boxes, but only make them 'enabled' if they are ticked on the other form (there is a '-1' in the table). I would put this code into an 'on open' of this form.

Excuse my basic descriptions, as i say... relative novice!
Here is what the statement for one tickbox would look like in generic terms. You would need to replace the object names I used for illustrative purposes with the names actually used in your application. You would also create a similar statement for each checkox control on your unbound form

Expand|Select|Wrap|Line Numbers
  1. If DLookup("[Tickbox1]", "YourTable") = 0 then
  2.         Me!txtCkbox1.Enabled = False
  3. Else
  4.         Me!txtCkbox1.Enabled = True
  5. End If
Dec 13 '07 #2
OllyJ
50
Worked 1st time. I had to add criteria as well but managed to sort that myself.

Thank you very much for your help. OllyJ
Dec 14 '07 #3

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

Similar topics

5
by: Deborah V. Gardner | last post by:
I would like to use "Yes" and "No" checkboxes on a subform. The problem is that when I click the Yes checkbox on the subform, all of the checkboxes are checked. Currently, I have a field...
2
by: john | last post by:
I posted this question to comp.lang.javascript but didn't get a response, so I'll try here. I am using ASP.NET and I have a datagrid. One of the columns in my grid is all checkboxes. When the...
4
by: schmidtmic | last post by:
I have a table that contains 20 checkbox fields. Each checkbox corrisponds to an Score amount. For Example: Checkbox1 is worth 10 points Checkbox2 is worth 5 points Checkbox3 is worth 2...
2
by: Geovanni Cesar | last post by:
I have a table with 12 checkboxes. I have the following function which when I check the last checkbox in the table, the first 10 checkboxes in the table are unchecked. - function...
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
by: Robert McEuen | last post by:
Using A2K3, Windows XP I'm handling a many-to-many relationship with a linking table structure as follows (irrelevant fields omitted): tblIssue PK_IssueID (autonumber, primary key) IssueName...
0
by: krokador | last post by:
This is doing my head in... We're starting to migrate our report-printing and such (forms included) to pdf - using xml files and nFOP with asp.net. In this case I have to print out a form which...
1
by: TechnoAtif | last post by:
Hi to all. I have got a form containing of checkboxes along with other items. I have simply no clue as to (i) how to make entry for those checkbox data into the mysql table . I mean : what query...
14
by: zufie | last post by:
I have to create a QA report regarding callers calling into a phone hotline. The report consists of many checkboxes such as: Did the IBCCP agency contact you? Yes/NO How many days passed...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.