Hi Everyone,
I'm creating a new database in which I'm trying to use VB to create criteria for use in query. But no luck. Here is what I have so far
Sub Array_Query()
MyQry(0) = "In ('0014705','0014710','0014715')":
End Sub
Function GL_Code(i As Integer)
On Error GoTo err_gl
Dim MyDB As Database
Set MyDB = CurrentDb
Call Array_Query
GL_Code = MyQry(i)
Exit Function
err_gl:
MsgBox Err.DESCRIPTION
Exit Function
End Function
I then put GL_Code(0) into the criteria of a query but it does not work. Any help would be apprieciated.
Sandman
I'm creating a new database in which I'm trying to use VB to create criteria for use in query. But no luck. Here is what I have so far
Sub Array_Query()
MyQry(0) = "In ('0014705','0014710','0014715')":
End Sub
Function GL_Code(i As Integer)
On Error GoTo err_gl
Dim MyDB As Database
Set MyDB = CurrentDb
Call Array_Query
GL_Code = MyQry(i)
Exit Function
err_gl:
MsgBox Err.DESCRIPTION
Exit Function
End Function
I then put GL_Code(0) into the criteria of a query but it does not work. Any help would be apprieciated.
Sandman