Type mismatch error

Results 1 to 2 of 2

Thread: Type mismatch error

  1. #1
    Join Date
    Dec 1969

    Default Type mismatch error

    I have a Access database with a yes/no field. Its format is true/false.<BR>When i test what the field is storing i get a type mismatch error. Here is the code im using:<BR><BR>if objEditGame("PP_Goal") = true then<BR><BR>I have also tried this:<BR><BR>if objEditGame("PP_Goal") = "True" then<BR><BR>I get the same type mismatch error both times. Can anyone help?<BR>Thanks

  2. #2
    rob Guest

    Default RE: Type mismatch error

    Try casting the recodset value to a boolean e.g.<BR><BR>if Cbool(objEditGame("PP_Goal")) = true then....<BR><BR>or try changing the type of the field to text. As long as when the database is updated, this field is generated by radio buttons or similar, the values stored will always be consistent<BR><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