CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Apr 2001
    Posts
    60

    setting a recordset name for access report at run time

    I create a table that has its name and data based on user input. For example, if a person selects "shipping" , I might have a table called "shipping". How do I set the recordsource in vb so that the Access report is based on the correct table ?

    thanks in advance!!!





  2. #2
    Join Date
    May 2000
    Location
    New York, NY, USA
    Posts
    2,878

    Re: setting a recordset name for access report at run time

    You can create a number of reports based on each table and then use Select case

    Select Case txtTableName
    Case "Table1"
    Call Report1
    Case "Table2"
    Call Report2
    etc...
    End Select

    If you need to know how to call report from Access, let me know

    Iouri Boutchkine
    [email protected]
    Iouri Boutchkine
    [email protected]

  3. #3
    Join Date
    Apr 2001
    Posts
    60

    Re: setting a recordset name for access report at run time

    Thank you Iouri. I guess I can't have one report that uses different tables as input.
    Thanks again.


  4. #4
    Join Date
    May 2000
    Location
    New York, NY, USA
    Posts
    2,878

    Re: setting a recordset name for access report at run time

    Rate it if it helped you

    Iouri Boutchkine
    [email protected]
    Iouri Boutchkine
    [email protected]

  5. #5
    Join Date
    Jul 2000
    Location
    Milano, Italy
    Posts
    7,726

    Re: setting a recordset name for access report at run time

    Give her some more time: she writed back to let you know. Next time she will discover "rate" combo and button
    :-)

    Special thanks to Lothar "the Great" Haensler, Tom Archer, Chris Eastwood, Bruno Paris and all the other wonderful people who made and make Codeguru a great place. Come back soon, you Gurus.
    ...at present time, using mainly Net 4.0, Vs 2010



    Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
    all the other wonderful people who made and make Codeguru a great place.
    Come back soon, you Gurus.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured