Results 1 to 3 of 3

Thread: Simple DAO question

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 1999
    Posts
    11

    Cool

    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?

  2. #2
    Hyperactive Member
    Join Date
    Feb 2000
    Posts
    284
    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.

  3. #3
    Fanatic Member
    Join Date
    Oct 2000
    Location
    London
    Posts
    1,008

    Option button values

    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.
    Not nearly so tired now...

    Haven't been around much so be gentle...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width