Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pass date prompt to Impromptu from MS Access VBA 1

Status
Not open for further replies.

ClifCamp

Technical User
Jul 24, 2001
23
US
I have been calling Impromptu 6.0 from MS Access, running reports and importing the results into Access with no problem. I now have a situation where I need to pass two dates from an Access form as prompts for an Impromptu report. I have tried everything I've been able to find in this forum that seems related to my case with no luck. The prompts in my Impromptu report are date prompts. If anyone knows how to pass these dates to Impromptu, I would very much appreciate knowing how. Here is my Access code:

Set objImpApp = CreateObject("CognosImpromptu.Application")
objImpApp.OpenCatalog "c:\Data Warehouse\Catalog\Hrms.cat", strSecLevel, , strPSID, strPassword

'assigns form text box values to string variables
strYrStart = txtYrStart
strYrEnd = txtYrEnd

Set objImpRep = objImpApp.OpenReport("C:\AAP\RayCatsHires.imr", strYrStart, strYrEnd)
objImpRep.RetrieveAll
objImpRep.ExportExcel ("C:\AAP\RayCatsHires.xls")
objImpRep.CloseReport
 
cliff,
I don't have Imp6, but Imp7 will only take one prompt string - use the pipe ('|') to separate individual items within a string
Code:
strPrompt = strYrStart + "|" + strYrEnd 
   
Set objImpRep = objImpApp.OpenReport("C:\AAP\RayCatsHires.imr", strPrompt)


soi la, soi carré
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top