Export Query

G

Guest

I have a form that asks the client what "batch" to export to excel. I need
the query to export to excel with a sort of parameterized query. I tried
using the control name as a paramter i.e. me.cbBatchNbr, but it didn't work.
How do I get the query to export only a subset?
 
J

John W. Vinson

I have a form that asks the client what "batch" to export to excel. I need
the query to export to excel with a sort of parameterized query. I tried
using the control name as a paramter i.e. me.cbBatchNbr, but it didn't work.
How do I get the query to export only a subset?

The JET database engine doesn't know what "me" means - that applies only in
VBA code on the form itself. Use

[Forms]![yourformname]![cbBatchNbr]

as a criterion and it should work fine. You're using the TransferSpreadsheet
method to do the export, I presume?

John W. Vinson [MVP]
 
G

Guest

Worked perfectly...thanx
--
Jim


John W. Vinson said:
I have a form that asks the client what "batch" to export to excel. I need
the query to export to excel with a sort of parameterized query. I tried
using the control name as a paramter i.e. me.cbBatchNbr, but it didn't work.
How do I get the query to export only a subset?

The JET database engine doesn't know what "me" means - that applies only in
VBA code on the form itself. Use

[Forms]![yourformname]![cbBatchNbr]

as a criterion and it should work fine. You're using the TransferSpreadsheet
method to do the export, I presume?

John W. Vinson [MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top