G
Guest
I am new to witing VBA and am struggling with writing a function. The
following code does not work. What could be wrong. Thanks in advance for your
hrlp.
Function GetItemDesc(ItemNumber As String)
Set conn = AS400.CreateObject("ADODB.Connection")
strConn = "DSN=AS400"
conn.Open strConn
strQuery = "SELECT USIAJFL0.JFITDS FROM AS400.SCDBFP10.USIAJFL0 WHERE
USIAJFL0.JFITEM=ItemNumber"
conn.Execute (strQuery)
End Function
following code does not work. What could be wrong. Thanks in advance for your
hrlp.
Function GetItemDesc(ItemNumber As String)
Set conn = AS400.CreateObject("ADODB.Connection")
strConn = "DSN=AS400"
conn.Open strConn
strQuery = "SELECT USIAJFL0.JFITDS FROM AS400.SCDBFP10.USIAJFL0 WHERE
USIAJFL0.JFITEM=ItemNumber"
conn.Execute (strQuery)
End Function