Click to See Complete Forum and Search --> : setting a recordset name for access report at run time


maggie gallotti
May 21st, 2001, 06:26 PM
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!!!

Iouri
May 22nd, 2001, 07:13 AM
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
iouri@hotsheet.com

maggie gallotti
May 22nd, 2001, 09:04 AM
Thank you Iouri. I guess I can't have one report that uses different tables as input.
Thanks again.

Iouri
May 23rd, 2001, 07:56 AM
Rate it if it helped you

Iouri Boutchkine
iouri@hotsheet.com

Cimperiali
May 23rd, 2001, 09:16 AM
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.