J
Jay
Hi,
Can anyone help?
I have a Access 97 database that I converted to XP.
This code works in 97:
Private Sub BUTTON5_CLICK()
Const MB_OK = 0, MB_OKCANCEL = 1, mb_ico 48'define buttons.
Const Quote = """"
Dim X As String
Dim Sqlstr As String
Sqlstr = "[Part] Like " & Quote & "*|forms! _&
[obsfrmQueryPart]![txtPart]|*" & Quote
X = DCount("[Part]", "obsolete", Sqlstr)
After the convesion X always comes up as 0, even on a
valid number. I rewrote it like this:
Private Sub BUTTON5_CLICK()
Const MB_OK = 0, MB_OKCANCEL = 1, mb_ico = 48
Dim X As String
Dim Sqlstr As String
Sqlstr = "[Part] Like '" & Forms![obsfrmQueryPart]!
[txtPart] & "'"
X = DCount("[Part]", "obsolete", Sqlstr)
It works with the whole number but any way I try to add
the wildcard it does not work at all!!??
Any ideas?
Can anyone help?
I have a Access 97 database that I converted to XP.
This code works in 97:
Private Sub BUTTON5_CLICK()
Const MB_OK = 0, MB_OKCANCEL = 1, mb_ico 48'define buttons.
Const Quote = """"
Dim X As String
Dim Sqlstr As String
Sqlstr = "[Part] Like " & Quote & "*|forms! _&
[obsfrmQueryPart]![txtPart]|*" & Quote
X = DCount("[Part]", "obsolete", Sqlstr)
After the convesion X always comes up as 0, even on a
valid number. I rewrote it like this:
Private Sub BUTTON5_CLICK()
Const MB_OK = 0, MB_OKCANCEL = 1, mb_ico = 48
Dim X As String
Dim Sqlstr As String
Sqlstr = "[Part] Like '" & Forms![obsfrmQueryPart]!
[txtPart] & "'"
X = DCount("[Part]", "obsolete", Sqlstr)
It works with the whole number but any way I try to add
the wildcard it does not work at all!!??
Any ideas?