Skip to main content
Inspiring
October 21, 2008
Question

saving checkbox info

  • October 21, 2008
  • 2 replies
  • 396 views
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.
    This topic has been closed for replies.

    2 replies

    tgooldAuthor
    Inspiring
    October 22, 2008
    Thanks. I think I'll try the last suggestion of saving the data, then comparing by a query.
    Inspiring
    October 22, 2008
    cookies are often used to preserve data entered on forms by users. This forum is a good example. When you log in, there is a "remember me" option. If you select it, a cookie is set and the next time you come to the forum, you are still logged in.
    tgooldAuthor
    Inspiring
    October 22, 2008
    I can see how that would be a good use, but for our use, we need to write this to a database. Any other suggestions?