Question
saving checkbox info
I'm sorry if this is a stupid question and is someplace in
all the docs. I've searched the docs, but either I don't
understand, or I'm just not finding what I'm looking for. Here's my
problem.
I have a table that holds a keycode and a keyvalue. Let's call it keytable. It's something like this:
a = military (a is the keycode and military is the keyvalue)
b= individual
c = business and so on for about 26 variables.
I'm displaying a form on my screen that is reading a table (lets call it formtable) that has a keycode in it also. If the keycode in this table has an "a" as the value, it means that it's military and the checkbox should display checked.
So after I do the query on formtable, it pulls out all the records and depending if there is something in the formtable.keycode field, shows it as checked. At this point, all is good.
Now, if I want to take the checkmark off military, and put one on individual and one on business, that's where the problem comes in. I don't know how to write it back to the file that the checkmarks have changed. I've tried arrays and can't get that to work. I must be doing something wrong. Can someone give me some sample code of how I might go about this? I hope this isn't too confusing. Thanks.
I have a table that holds a keycode and a keyvalue. Let's call it keytable. It's something like this:
a = military (a is the keycode and military is the keyvalue)
b= individual
c = business and so on for about 26 variables.
I'm displaying a form on my screen that is reading a table (lets call it formtable) that has a keycode in it also. If the keycode in this table has an "a" as the value, it means that it's military and the checkbox should display checked.
So after I do the query on formtable, it pulls out all the records and depending if there is something in the formtable.keycode field, shows it as checked. At this point, all is good.
Now, if I want to take the checkmark off military, and put one on individual and one on business, that's where the problem comes in. I don't know how to write it back to the file that the checkmarks have changed. I've tried arrays and can't get that to work. I must be doing something wrong. Can someone give me some sample code of how I might go about this? I hope this isn't too confusing. Thanks.
