jeran042
Registered User.
- Local time
- Today, 01:17
- Joined
- Jun 26, 2017
- Messages
- 127
I have a continuous for, with a txt search box that contains a sql statement.
the sql statement is as follows:
What I want to do is add a button to the form to export the results to an excel file, but unsure how to accomplish this.
I have tried docmd.OutPutTo by the limitations are, I am not matching a user input to a specific table field.
A second though I had was to use the docmd.setparameters, but am unsure if this is the best way to go, would anyone have any ideas or points in the best direction?
Very much appreciated,
the sql statement is as follows:
Code:
strLedger = "Select * from qryLedger_Detail where DESCRIPTION like ""*" _
& strText & "*"" or VOUCHER like ""*" _
& strText & "*"" or POLICY like ""*" _
& strText & "*"" or ACCOUNT_NUMBER like ""*" _
& strText & "*"" or NOTES like ""*" _
& strText & "*"" ORDER BY [MO_DAY] DESC"
What I want to do is add a button to the form to export the results to an excel file, but unsure how to accomplish this.
I have tried docmd.OutPutTo by the limitations are, I am not matching a user input to a specific table field.
A second though I had was to use the docmd.setparameters, but am unsure if this is the best way to go, would anyone have any ideas or points in the best direction?
Very much appreciated,