Problem with Passing Values Between Procedures

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nico3334
    New Member
    • Aug 2007
    • 28

    Problem with Passing Values Between Procedures

    I am creating a report that pulls values from a SQL table in visual basic. I have 3 main procedures.

    The Main procedure PrintInitialize CALLS 2 other procedures during its coding:

    GetTempData

    and

    PrintReportData

    My problem is that GetTempData creates a dynamic table name called strTempName and I want the PrintReportData procedure to recognize what this value is. I'm not sure how to pass the value back into the PrintInitialize procedure after it has finished calling it.

    Here is a more detailed explanation:


    The 1st procedure (PrintInitializ e) runs through some intial printing details, and it calls another procedure (GetTempData). This "GetTempDat a creates a Temp Table with the name "strTempNam e" and fills the table with the needed data. After "GetTempDat a" is complete, "PrintInitializ e" continues through its coding and calls another procedure "PrintRepor t". This procedure pulls some data out of the Temp Table, so I need to pass the "strTempNam e" into this procedure so it knows what the name is (the name is dynamic as it uses the NOW function, so it will always change).

    Since the "GetTempDat a" procedure just stops after it has created the temp table, I'm not sure how to essentially pass the strTempName back into the PrintInitialize coding so it recognizes what the value is. Can anyone help?

    Thanks!
Working...