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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Telling a prompt to "select all" with a macro

Status
Not open for further replies.
Sep 10, 2010
2
GB
Hi,

I'm desperately trying to solve this problem.

After opening a report with a macro that enters the data for two of the prompts. The third one is a list that comes from a csv-file and is being filled automatically.

How do I tell Impromptu to use the data the macro entered into the first two prompts and to use all the data from the file picklist?

Stuff like
strPrompt1&"|"&strPrompt2&"|<All>"
does not work... what has to replace the "<All>"-bit to achieve what I'm aiming at?

Thanks a lot in advance!
Jan
 
I had thought that either using CHR(13) or SENDKEYS would work, but no joy. Since it's a csv file, can you not read it within the macro and construct a prompt?
Code:
   Dim prompt, record as string
   prompt = ""
   OPEN "C:\Data_Folder\source.csv" FOR INPUT AS #1
   Do While Not Eof(1)
      input #1, record
      prompt = prompt + record + ","          
   Loop
   Close #1

soi là, soi carré
 
Hi drlex,

Thank you very much for your reply!

I found a way to work with a picklist and other prompts at the same time. Unfortunately I haven’t had the time to post the answer so far.

Just use the method “OpenReportExA” instead of “OpenReport” to access the report.

For a prompt simply use something like “<All=true>|<>prompt2|<>prompt3”.

As far as I can tell, the picklist has to be the first prompt to be served. I had to rearrange the order of my prompts to put the picklist first.

To fill the following prompts it’s important to use the “<>” after the pipe (“|”), otherwise no data will show up in these prompts and the macro will stop.

Best regards from Hamburg/Germany,
Jan
 
Jan,
Thanks for replying with the solution - I went and dug out a copy of imp_mac.pdf to look up that Command; intriguing!


soi là, soi carré
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top