J
Jon Poste via AccessMonster.com
Hi,
I am running a module in an AC97 database and require a little
assistance. I have a module that runs throught and create a number of word
documents that we have to send to our suppliers. There is no problem with
this process, however each time the documents have to be saved into a
different place depending on the order numbers.
I have been thinking and the best way I can come up with is to have the
file paths and SQL statements variable in the module. I have achieved this
with the SQL source but unsure how to add any more parameters to the query.
********************************************************
Sub CreateWordReportIndustry(Optional SQLSource)
Dim strURL$, strFileName$, strFilePath$
Dim objWord As Word.Application
Dim db As Database, rs As Recordset
Set db = CurrentDb()
'Set rs = db.OpenRecordset("SELECT * from qryFeedIndustryUpdateAll")
Set rs = db.OpenRecordset(SQLSource)
*********************************************************
The rs is using the (Optional SQLSource) parameter OK but I cannot add any
more.
I am not sure if this is the right way, but any help would be greatly
appreciated.
Cheers
Jon
I am running a module in an AC97 database and require a little
assistance. I have a module that runs throught and create a number of word
documents that we have to send to our suppliers. There is no problem with
this process, however each time the documents have to be saved into a
different place depending on the order numbers.
I have been thinking and the best way I can come up with is to have the
file paths and SQL statements variable in the module. I have achieved this
with the SQL source but unsure how to add any more parameters to the query.
********************************************************
Sub CreateWordReportIndustry(Optional SQLSource)
Dim strURL$, strFileName$, strFilePath$
Dim objWord As Word.Application
Dim db As Database, rs As Recordset
Set db = CurrentDb()
'Set rs = db.OpenRecordset("SELECT * from qryFeedIndustryUpdateAll")
Set rs = db.OpenRecordset(SQLSource)
*********************************************************
The rs is using the (Optional SQLSource) parameter OK but I cannot add any
more.
I am not sure if this is the right way, but any help would be greatly
appreciated.
Cheers
Jon