Hi eveyone,
Its my first time to use MS Access 2003 and I need to modify the existing program
I have a MS Access query and I want to fetch the record 1 by 1 and write the result in a text file. Can I use MS Access OpenRecordSet() for this? If yes,
can anybody help me with the syntax? I tried the following code but it didn't work
Another question, how can I pass parameter to my existing query?
this is the select statement of my query
Thanks in advance
Its my first time to use MS Access 2003 and I need to modify the existing program
I have a MS Access query and I want to fetch the record 1 by 1 and write the result in a text file. Can I use MS Access OpenRecordSet() for this? If yes,
can anybody help me with the syntax? I tried the following code but it didn't work
Code:
... Dim MyDb As Database Dim rstQry As Recordset strQry = "CashierOrder" ' my MS Access Query Set rstQry = MyDb.OpenRecordset(strQry) ' fails here saying Too few parameters. Expected 2.[3061] ...
Another question, how can I pass parameter to my existing query?
this is the select statement of my query
Code:
SELECT Format$(DSum("sumofamount","subqry_CashierOrder"),"#.00") AS Expr3 FROM dbo_SALFLDGDSN INNER JOIN dbo_qrySSRFADDDSN ON dbo_SALFLDGDSN.ACCNT_CODE = dbo_qrySSRFADDDSN.ADD_CODE WHERE (((dbo_SALFLDGDSN.D_C)="C")) GROUP BY dbo_SALFLDGDSN.PERIOD, Trim([ACCNT_CODE]), dbo_SALFLDGDSN.JRNAL_NO HAVING (((dbo_SALFLDGDSN.PERIOD)=SunToSqlServerPeriod([Forms]![frmPayInvFileGen]![txtRepPeriod])) AND ((Trim([ACCNT_CODE])) Like "9*") AND ((dbo_SALFLDGDSN.JRNAL_NO)=[Forms]![frmPayInvFileGen]![txtJrnlNo])) ORDER BY Trim([ACCNT_CODE])
Comment