Click to See Complete Forum and Search --> : Simple DAO question
Delta34
Nov 2nd, 2000, 04:06 PM
Problem: When clicking on an option button I would like to store a value (1 or 0) in a database. I'm using DAO.
Also what about staying on the same record to fill in each field with a 1 or 0
Does anybody have a block of code for this?
Bigley
Nov 2nd, 2000, 04:44 PM
Could you not just use
If opt1.value = 0 then
sSql = sSql & ", 0"
else
sSql = sSql & ", 1"
end if
That is if the option button value is returned in code as 0/-1 or is that the check box, I can never remember. sSql being the string that you want to execute against the database.
paulw
Nov 3rd, 2000, 03:25 AM
You would be better using a Check box which returns 1 or 0. This can be bound directly to your table.
If you have a group of mutually exclusive options then you will need more than 1 and 0 to indicate which value is selected - if they are not exclusive then use Check Boxes.
Cheers,
Paul.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.