Forums
This topic is locked
hidden field to update checkbox in database
Posted 04 Jul 2002 20:54:33
1
has voted
04 Jul 2002 20:54:33 Dave Clarke posted:
I have a field in my table called fldChecked which is a Yes/No checkbox, when a user posts a message this defaults to No (unchecked) so that later from my admin page I can review this message and if I approve it I can then tick a checkbox on the page which updates the field in the table (Yes/checked). this is working fine.If the user later comes back and edits his message I want the fldChecked checkbox to revert to No/unchecked so that i can review the message again, i can do his with a checkbox in a form on the update page but i want to do it with a hidden field so that the user has no input into whether the message has been reviewed or not. I have tried using hidden field with a value of "No" and in the update server behaviour having this hiddenfield update fldchecked with the "insert as" set to checkboxMS Access but it doesnt alter the checkbox in the database, although i get no errors.
hope this makes sense
Dave
Replies
Replied 05 Jul 2002 03:48:20
05 Jul 2002 03:48:20 b w replied:
Would it be a quote 'NO' or "NO" Issue? The other thing might be a 0 or 1 issue.
I assume it works without using the hidden field but doesn't when using hidden field.
I assume it works without using the hidden field but doesn't when using hidden field.
Replied 05 Jul 2002 03:55:42
05 Jul 2002 03:55:42 aegis kleais replied:
I find the easiest way is to just make it a text input field (hidden). if you dont give the VALUE attribute to the CB then off is FALSE and on is TRUE. Then I use a database field that is TEXT (memo for access) and update it with the hidden field value.
Access is super pissy about CBox 1,0, CBox Y/N, CBox True/False, different Date formats and whatnot.
Access is super pissy about CBox 1,0, CBox Y/N, CBox True/False, different Date formats and whatnot.
Replied 05 Jul 2002 06:34:56
05 Jul 2002 06:34:56 Dave Clarke replied:
Yes if i have a checkbox on the page, then checking and unchecking work fine but with a hidden field it doesn't work.
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
Would it be a quote 'NO' or "NO" Issue? The other thing might be a 0 or 1 issue.
I assume it works without using the hidden field but doesn't when using hidden field.
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
Would it be a quote 'NO' or "NO" Issue? The other thing might be a 0 or 1 issue.
I assume it works without using the hidden field but doesn't when using hidden field.
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
Replied 05 Jul 2002 06:38:00
05 Jul 2002 06:38:00 Dave Clarke replied:
mmmmm, sounds like a good idea, will check it out, thanks
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
I find the easiest way is to just make it a text input field (hidden). if you dont give the VALUE attribute to the CB then off is FALSE and on is TRUE. Then I use a database field that is TEXT (memo for access) and update it with the hidden field value.
Access is super pissy about CBox 1,0, CBox Y/N, CBox True/False, different Date formats and whatnot.
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
I find the easiest way is to just make it a text input field (hidden). if you dont give the VALUE attribute to the CB then off is FALSE and on is TRUE. Then I use a database field that is TEXT (memo for access) and update it with the hidden field value.
Access is super pissy about CBox 1,0, CBox Y/N, CBox True/False, different Date formats and whatnot.
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
Replied 05 Jul 2002 19:48:16
05 Jul 2002 19:48:16 Dave Clarke replied:
thanks aegiskleais
changed the field to a text one instead of a checkbox, which defaults to "No", then when i check the page on the site, i have a check box in the form which i can tick to update this field to "Yes".
If the user comes back and edits his message a hidden field updates the table field back to "No" and I go review it again.
seems to be working fine now
thanks again
Dave
changed the field to a text one instead of a checkbox, which defaults to "No", then when i check the page on the site, i have a check box in the form which i can tick to update this field to "Yes".
If the user comes back and edits his message a hidden field updates the table field back to "No" and I go review it again.
seems to be working fine now
thanks again
Dave