M
Madhuri
Hi all
I have a button on my msaccess form which ports data into excel but I want
excel to port only a particular set of fields and only the record which has
been selected when the excel button is pressed. for that I am trying to build
a query in my code which looks like this
CurrentDb.CreateQueryDef "xlqry", "select * from qkpwc_recoup where
rec_isn='" & Me.REC_ISN & "'"
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "xlqry",
"C:\FileNameIs.xls", True
But the first statement dosent seem to be creating a query when I execute
the command. How do I create a dynamic query stored in access database to
enable the above functioning.
Thanks in advance
Madhuri
I have a button on my msaccess form which ports data into excel but I want
excel to port only a particular set of fields and only the record which has
been selected when the excel button is pressed. for that I am trying to build
a query in my code which looks like this
CurrentDb.CreateQueryDef "xlqry", "select * from qkpwc_recoup where
rec_isn='" & Me.REC_ISN & "'"
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "xlqry",
"C:\FileNameIs.xls", True
But the first statement dosent seem to be creating a query when I execute
the command. How do I create a dynamic query stored in access database to
enable the above functioning.
Thanks in advance
Madhuri