Results 1 to 4 of 4

Thread: True DB Checkbox Question

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2000
    Posts
    11

    Question

    Heres the scenario - any help is appreciated.

    i have a recordset that is to a True DB (oledb) grid. One of the rows in the grid is a checkbox. The checkbox needs to be checked for all the records to start. So, i made my select statement something like:

    select ..., -1 as letter from... where... etc

    and then i bound the letter column on the grid (the checkbox) to the letter column in the recordset.

    everything runs smoothly except that when i uncheck the checkbox and move to another record (via downarrow or mouse).. it checks itself again - like i never touched it.

    ive also found that if i change the select statement so that part reads ..'1' as letter.. the screen will pull up, all the checkboxes will be checked and i can uncheck them. the problem here happens when i try to check them again. i get a 'data type mismatch' error

    thanks for any assistance
    Rob Seliga
    VB Developer

  2. #2
    Lively Member
    Join Date
    Apr 2000
    Location
    Rafaela (Argentine)
    Posts
    107
    I think you should add a Yes/No column to the table which is the recordset's source. If you select a '-1' as a column, you are selecting a constant value, and it causes the error in the DBGrid.

  3. #3

    Thread Starter
    New Member
    Join Date
    Aug 2000
    Posts
    11

    True DB Checkbox Question

    That would work, but im in an Oracle environment. The letter field that the checkbox is for isn't really something thats going to be written back to a table... there will be other columns with information in the grid that will be written back, but the checkbox is just for printing letters.
    Rob Seliga
    VB Developer

  4. #4

    Thread Starter
    New Member
    Join Date
    Aug 2000
    Posts
    11

    Talking True DB Checkbox Question

    Figured it out

    what i did was:

    set <recordsetname> = select field1, field2, null as letter ..<regularstuff>...

    then once its created, loop through it and set the data = -1

    with rstemp
    for i = 1 to .recordcount
    !letter = -1
    .movenext
    next i
    end with

    works like a charm - thanks again!
    Rob Seliga
    VB Developer

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