473,378 Members | 1,380 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

inhoud van formulierveld gebruiken als bestandsnaam bij output naar excel.

Help !

Ik gebruik een macro om een query uit te voeren naar ExceL. Dit werkt
perfect. Nu wil ik echter dat het Excel-bestand als bestandsnaam de
inhoud van een formulierveld gebruikt (formulier staat open). Wat ik
ook invoer bij "uitvoerbestand" (dingen als [Forms]![klant]!
[klantnr] ; ([Forms]![klant]![klantnr]) ;= [Forms]![klant]!
[klantnr] ; ...)
ik krijg steeds een "file" met als bestandsnaam datgene wat ik had
ingevuld bij uitvoerbestand (zelfs met de tekens die normaal niet
toegestaan zijn voor bestandsnamen.

Kan iemand mij vertellen hoe ik dit in orde krijg. Er resten mij
immers nog een 200-tal outputs uit te voeren ....

Embee

Sep 5 '07 #1
1 2748
On Wed, 05 Sep 2007 12:30:13 -0700, em*****@skynet.be wrote:

Men spreekt hier Engels.
Macros may not be powerful enough for what you want to do, but you can
certainly write one line of VBA code to do this with
DoCmd.TransferSpreadsheet
and then using:
"c:\test\" & [Forms]![klant]![klantnr] & ".xls"
as the FileName argument.

-Tom.

>Help !

Ik gebruik een macro om een query uit te voeren naar ExceL. Dit werkt
perfect. Nu wil ik echter dat het Excel-bestand als bestandsnaam de
inhoud van een formulierveld gebruikt (formulier staat open). Wat ik
ook invoer bij "uitvoerbestand" (dingen als [Forms]![klant]!
[klantnr] ; ([Forms]![klant]![klantnr]) ;= [Forms]![klant]!
[klantnr] ; ...)
ik krijg steeds een "file" met als bestandsnaam datgene wat ik had
ingevuld bij uitvoerbestand (zelfs met de tekens die normaal niet
toegestaan zijn voor bestandsnamen.

Kan iemand mij vertellen hoe ik dit in orde krijg. Er resten mij
immers nog een 200-tal outputs uit te voeren ....

Embee
Sep 7 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Beowulf | last post by:
Hi, I have an XML file generated by a third party (and therefore unchangable) program. 1st line in it is <?xml version="1.0" encoding="us-ascii"?> and down in the depths of the xml I have a...
1
by: tkaleb | last post by:
I have to create output file in a text, MS Access, MS Excel and .dbf format from C# Win/ADO.NET application. Data are collected in DataSet and there is no problem to make text file. However, I have...
6
by: Mark Rae | last post by:
Hi, My client has asked me to provide a "quick and dirty" way to export the contents of a DataGrid to both Excel for analysis and Word for editing and printing, so I'm investigating client-side...
5
ADezii
by: ADezii | last post by:
Periodically, the same or similar question appears in our Access Forum: How can I use Excel Functions within Access? For this reason, I decided to make this Subject TheScripts Tip of the Week. In...
3
by: =?Utf-8?B?UGF1bA==?= | last post by:
Hi I have an sql database and I need to do the following, hoping there are some examples I can look at to impliment. 1. Copy an excel file on the server, just using a new name. For example...
1
by: DennisBetten | last post by:
First of all, I need to give some credit to Mahesh Chand for providing me with an excellent basis to export data to excel. What does this code do: As the title says, this code is capable of...
4
by: drt | last post by:
NEDERLANDS: Hallo, Ik heb eigen functies gemaakt in access, die werken perfect in de access query. Zodra ik echter vanuit excel een draaitabel maakt naar de access query (als een externe...
18
by: Paul Lautman | last post by:
JRough wrote: What do you mean by "redirect the output to Excel"??? Excel isn't a location, it's a spreadsheet program that some (but not all users) will have on their machine. BTW, Location:...
0
by: =?Utf-8?B?ZGlzcGxheW5hbWU=?= | last post by:
The following code used to outputs to Excel 2003 fine. Do I need to change it to output to Excel 2007? <% Response.ContentType = "application/vnd.ms-excel" Response.AddHeader...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.