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!

CR 8.5 and modifing Access Table name in report

Status
Not open for further replies.

digiware

Technical User
Oct 29, 2003
1
IT
I've a report built with Crystal Report 8.5, called by Visual Basic 6, which works with table "Table1" on an Access 97 and/or 2000 database

For special reasons, I need to tell the report at runtime to use Table2 instead, which has the same structure of Table2.

I can successfully tell the Report the new path to use to reach the Access database, which varies upon user installation.

I've tried the following methods:

cDB = full path (path + name.ext) to the Access database
NewName = new table name, ie "Table2"

Report.Database.Tables(1).SetTableLocation cDB, NewName, ""

and

Report.Database.Tables(1).Location = cDB
Report.Database.Tables(1).Name = NewName

And

Report.Database.Tables(1).SetLogOnInfo cDB, NewName, "", ""

but I got nowhere.

Any clue?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top