transferspreadsheet

G

Guest

1. I have a four separate Access queries that have an ask parameter.

2. I created a macro that takes each query and exports it to one
Excel file with four tabs.

3. I use the transferspreadsheet in Access for the macro.



The question I have is this I have seen were you suggested to a user asking
that the user that is trying to run the macro not to have to answer the
parameter four separate times. Could you explain the steps?
 
D

Douglas J. Steele

Create a form that has a text box on it.

Change your 4 queries to point to that text box. You do this by using
Forms!NameOfForm!NameOfTextBox instead whatever you've currently got inside
the square brackets as the criteria.

Have a button on your form that uses TransferSpreadsheet 4 times.

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


"(e-mail address removed)"
 
G

Guest

I must be doing something wrong. I will explain what is happening. I
created a form called Prod so string is [Forms]![Prod]![Unit]. I have to
leave the form open with the unit number I want then I run the macro and it
asks me four times what unit number I want based on the four separate
queries. What I am doing wrong or what step I am leaving out that you want
me to put on the form. You stated "Have a button on your form that uses
TransferSpreadsheet 4 times." I am not sure what you mean.

Thanks for any help you can give me.
 
G

Guest

Douglas after thinking about your message for a while I figured out what you
wanted me to do. I made the changes and everything is working thanks.

I must be doing something wrong. I will explain what is happening. I
created a form called Prod so string is [Forms]![Prod]![Unit]. I have to
leave the form open with the unit number I want then I run the macro and it
asks me four times what unit number I want based on the four separate
queries. What I am doing wrong or what step I am leaving out that you want
me to put on the form. You stated "Have a button on your form that uses
TransferSpreadsheet 4 times." I am not sure what you mean.

Thanks for any help you can give me.

Douglas J. Steele said:
Create a form that has a text box on it.

Change your 4 queries to point to that text box. You do this by using
Forms!NameOfForm!NameOfTextBox instead whatever you've currently got inside
the square brackets as the criteria.

Have a button on your form that uses TransferSpreadsheet 4 times.

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


"(e-mail address removed)"
 

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