Need help soon as possible

Results 1 to 4 of 4

Thread: Need help soon as possible

  1. #1
    Desperate Guest

    Default Need help soon as possible

    Im trying to test to check if a field in my database is checked or unchecked. It is an access database and the field is of type "yes/no" with a lookup property of "checkbox".<BR>This is the code i use:<BR><BR>if objEditGame("PP_Goal") = checked then<BR><BR>I get a type mismatch error.<BR>Can anyone help?

  2. #2
    Bill H. Guest

    Default RE: Need help soon as possible

    It&#039;s type yes/no right? Isn&#039;t that what&#039;s supposed to be in the database? Have you checked whether it&#039;s yes/no? As in...<BR>if objEditGame("PP_Goal") = "yes" then...<BR><BR>

  3. #3
    Desperate Guest

    Default RE: Need help soon as possible

    I think I have an answer. Thanks anyway

  4. #4
    Join Date
    Dec 1969

    Default Yes/No fields are a lie...

    The display of Yes/No is *strictly* a DISPLAY enhancement.<BR><BR>In actuality, Yes/No and similar fields are just BOOLEAN fields. Meaning that they are actually true/false fields.<BR><BR>And when you read such a field using ADODB, you actually get a VBS (or JS) *boolean* value.<BR><BR>SO....<BR><BR>&#060;%<BR>...<BR>If objEditGame("PP_Goal") Then<BR>&nbsp; &nbsp; ... field is true ...<BR>Else<BR>&nbsp; &nbsp; ... field is false ...<BR>End If<BR>...<BR>%&#062;<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts