Hi Folks,
I have a snipet of code that I am working with, unfortunetly; I don't know VB very well and was wondering how to create a table with this code as oppossed to making and opening a query. The code works fine thus far.
.....
SQL = " SELECT * " & _
" FROM dbo_v_claim_ap_pmtD " & _
" WHERE (clmstat = 'a' or clmstat = 'p') and (procstat = 'p' or procstat = 'f') and (fiscal_year = '2002' or fiscal_year = '2003') and company = 'lucam' and " & sCriteria & sCriteria2 & sCriteria3
Set db = CurrentDb
On Error Resume Next
db.QueryDefs.Delete "qryDataType"
On Error GoTo 0
Set qDef = db.CreateQueryDef("qryDataType", SQL)
DoCmd.OpenQuery "qryDataType"
End Sub
...
I would appreciate any help I can receive.
Thank you very much,
Joe
I have a snipet of code that I am working with, unfortunetly; I don't know VB very well and was wondering how to create a table with this code as oppossed to making and opening a query. The code works fine thus far.
.....
SQL = " SELECT * " & _
" FROM dbo_v_claim_ap_pmtD " & _
" WHERE (clmstat = 'a' or clmstat = 'p') and (procstat = 'p' or procstat = 'f') and (fiscal_year = '2002' or fiscal_year = '2003') and company = 'lucam' and " & sCriteria & sCriteria2 & sCriteria3
Set db = CurrentDb
On Error Resume Next
db.QueryDefs.Delete "qryDataType"
On Error GoTo 0
Set qDef = db.CreateQueryDef("qryDataType", SQL)
DoCmd.OpenQuery "qryDataType"
End Sub
...
I would appreciate any help I can receive.
Thank you very much,
Joe