Hi, all this is my question:-

I am creating a double tier vb6 application with access in format 7.0 mdb. For this application i'm creating reports using crystal report 9. Now i want to show the report to view data from tables after passing some criteria.

I have a table called Quotation. There i'm storing 'quot_no ' as the primary key. Now i want to select an quotation no. from my vb6 apps and then the report will be called to show the data for the selected quotation no. only.

So, how can i do that?
Is there a way or do i have to convert my database to network db such as sql server?

Plz Reply me soon.
It's very urgent

try the following code

Public Sub DailyReportDisplay(Query As String)
Set CRXReport = CrystalReport2
Set CRXDb = CRXReport.Database
CRXReport.DiscardSavedData
inti = 1
Do Until inti = CRXReport.Database.Tables.count + 1
CRXReport.Database.Tables.Item(inti).SetLogOnInfo strdblocation, "das", "debasis", "debasis"
inti = inti + 1
Loop
CrystalReport2.SQLQueryString = Query
With FrmReport
.Show
.CRV1.ReportSource = CRXReport
.CRV1.ViewReport
End With
Set CRXReport = Nothing
End Sub

the above code uses crystal report viewer.

u need to add crystal report library and a crystal report viewer.

The above is for Oracle connection.

ok i have understood the coding. but my question was from msaccess point of view. now could u plz tell me which portion of the code should i need to modify to make it fit for accessing msaccess database.

No, the answer is all there. first in your mdb file, you must create first a query, 2nd in VB in Data Environment you must configure it because there you will connect to the database. then get your query and make some code in your form. please browse my sample program.

No, the answer is all there. first in your mdb file, you must create first a query, 2nd in VB in Data Environment you must configure it because there you will connect to the database. then get your query and make some code in your form. please browse my sample program.

JIREH...............
ok man. i searched there again but found nothing. plz do me a favour. could u attach ur sample program here plz plz plz...............

plz help me out
its very very urgent

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.