|
-
Sep 13th, 2000, 02:33 PM
#1
Thread Starter
New Member
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
-
Sep 13th, 2000, 03:30 PM
#2
Lively Member
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.
-
Sep 14th, 2000, 09:42 AM
#3
Thread Starter
New Member
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.
-
Sep 14th, 2000, 01:08 PM
#4
Thread Starter
New Member
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!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|