G
Guest
Hi there
I'm currently experiencing a problem with string comparison in VB ACCESS. Whenever I make an If Clause, the message of invalid procedure call or argument error will prompt. However, If compare with integer then it will pass. I can go though if I use the function strComp().
Just want to let you know I used my other computer that has the same version and libraries, and it works fine. Can you suggest what happenned there
Public Sub MySub(sProd As String
Dim s As Strin
Dim x As Intege
Dim varmsg As Varian
s = sPro
' this wor
varmsg = MsgBox(s
x = StrComp(sProd, "h/s"
If x = 0 The
varmsg = MsgBox("s"
End I
'this does not wor
If "s" = "s" The
varmsg = MsgBox(h
Els
varmsg = MsgBox(s
End I
'this wor
'If 1 = 1 The
' varmsg = MsgBox(s
'End I
End Sub
I'm currently experiencing a problem with string comparison in VB ACCESS. Whenever I make an If Clause, the message of invalid procedure call or argument error will prompt. However, If compare with integer then it will pass. I can go though if I use the function strComp().
Just want to let you know I used my other computer that has the same version and libraries, and it works fine. Can you suggest what happenned there
Public Sub MySub(sProd As String
Dim s As Strin
Dim x As Intege
Dim varmsg As Varian
s = sPro
' this wor
varmsg = MsgBox(s
x = StrComp(sProd, "h/s"
If x = 0 The
varmsg = MsgBox("s"
End I
'this does not wor
If "s" = "s" The
varmsg = MsgBox(h
Els
varmsg = MsgBox(s
End I
'this wor
'If 1 = 1 The
' varmsg = MsgBox(s
'End I
End Sub