Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

crystal report activex in vb

Posted on 2000-03-14
1
Medium Priority
?
326 Views
Last Modified: 2010-05-02
I'm using the crystal report activex to run a report on accesstables.
Using de datafiles-property I can change the drive, path and .mdbname.  Can I change the name of the tables too ?
Per year I have an ordertable.  Depending on the users choice I have to print the report based on table ordr98 or ordr99 ...
0
Comment
Question by:pce
1 Comment
 
LVL 5

Accepted Solution

by:
Voodooman earned 450 total points
ID: 2616927
No you cant! Because CR doesnt allow you to change the field and table names. You can  

But what you can do is use a temporary table for your report.  Before you run the report run an Append query to append the records you want from the table of your choice to the TEMP table.

After running the report delete the recs from the TEMP table.

in VB
Dim db as database
Dim rs as DAO.Recordset

Set db=opendatabase("C:\Mydir\Mydatabase.mdb")

db.execute "Append mytable.[Field1]...etc

Report.action=1

DoEvents

db.execute "Delete from MyTable.....

Good Luck

VoodooMan!
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

926 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question