Have you done a TRACE to see which line is causing the error?
>>>I am trying to evaluate check box values.
>>>Sometimes when I check for thisform.chkmybox = 1 - it works
>>>and sometimes it does not.
>>>Sometimes when I check for thisform.chkmybox = .t. - it works
>>>and sometimes it does not.
>>>Does the check have two value (1 and t)?
>>>I would like to evaluate a check box with an IF statement
>>>and then do something.
>>
>>Hi, Rob! I hope you actually check for Thisform.chkmybox.Value. It can be 1,2,0
>
>Hi, Edward - and good morning...
>The reason why I am asking is, I am tryng to build a WHERE CLAUSE and I am getting a DATA TYPE MISMATCH when I run the below code..
>It works and the dot prompt, but not in the CLICK event of an OK button.
>
>* -- start code
>m_filter = ""
>got_a_bite = .f.
>
>if thisform.chk_one.value = 1
> m_filter = "myfld = '1'"
> got_a_bite = .t.
>endif
>
>if thisform.chk_two.value = 1
> if got_a_bite
> m_filter = m_filter + " or "
> endif
> m_filter = m_filter + "myfld = '3'"
> got_a_bite = 1
>endif
>
>if thisform.chk_three.value = 1
> if got_a_bite
> m_filter = m_filter + " or "
> endif
> m_filter = m_filter + "myfld = '7'"
> got_a_bite = 1
>endif
>?m_filter
>* -- end of code
>thanks
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only