09. september 2005 - 08:34Der er
8 kommentarer og 1 løsning
40 rapporter i egne filer
Jeg har en rapport som jeg vil ha' exporteret til excel. Den bestaar af information som skal sendes til alle afdelinger, men det skal kun ha' deres egen information. Jeg har styr paa at lave rapporterne saa de sendes til printeren, en per afdeling, men nu vil jeg gerne ha' skrevet dem til en excel fil, navngivet efter afdelingen. Hvordan goer jeg nemmest det?
Denne side indeholder artikler med forskellige perspektiver på Identity & Access Management i private og offentlige organisationer. Artiklerne behandler aktuelle IAM-emner og leveres af producenter, rådgivere og implementeringspartnere.
Terry, I want to send it to Excel because the recepient in each department must make comments on each line and return it. This is much easier and handy in Excel than in Word
Is the report just ONE report which is grouped on department (afdeling)? If so then I think you need to change this so that one report is created for each department.
THis is just an idea.
If the report is based on a query then in the query you need a criteria for filtering a given department. You can set a criteria field in the query to "look" at a field on a form.
The criteria feld will look something like this
[forms]![YourForm]![FieldContainingDepartment]
Now you need some code in the form which loops through all departments, setting the field FieldContainingDepartment to the department.
For each department (in the loop) you first set the field and then you send the report in a mail as Excel using code something like this.
That was was pretty much what I wanted! I have the looping working, but would like to just create a file in a specified folder instead of sending it directly as it needs to be bundled with other information... So I guess I am just looking for a way of creating an excel file using VBA
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.