Solved

Access report from VB5.0

Posted on 2001-06-12
30
258 Views
Last Modified: 2013-11-28
I would like to be able to send a varable to access from vb5.0 and print out a access report.

Thanks
Steve
0
Comment
Question by:steve_mills
  • 13
  • 10
  • 3
  • +3
30 Comments
 
LVL 50

Expert Comment

by:Ryan Chong
ID: 6184203
Hi, i think what you need is use VB5.0 to connect to the access database rather than send a variable to it.
0
 

Author Comment

by:steve_mills
ID: 6184318
How do I do this
0
 
LVL 50

Expert Comment

by:Ryan Chong
ID: 6184360
Hi, i can't tell you the purpose way, bcos i'm using VB6 right now.

Anyway, Are you develop your application on Access Database itself? If yes then you should use VBA included in Access.

OR if you want to use VB, then there are so many ways to connect VB to an Access Database, such as ADO, DAO.
0
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
LVL 70

Expert Comment

by:Éric Moreau
ID: 6184383
Do you want to filter your data? In this case, you can use the last parameter of the OpenReport method (which is the Criteria and must contain the Where clause).
0
 

Author Comment

by:steve_mills
ID: 6184697
Has anyone have a snipit of code I can look at because you guys are loosing me.

Thanks
Steve
0
 

Expert Comment

by:mpaul4u
ID: 6184783
hi
create a report design in access and save
include crystal report activex control
use open report method to connect to access report
i think you can give report name intead of table
you can  create paramater field in access and
we assign values into paramater field using the crytal controls methods
explore
regards
0
 

Author Comment

by:steve_mills
ID: 6184811
mpaul4u can you give me the vb5.0 comands you are talking about
0
 

Expert Comment

by:milktin
ID: 6185168
Hi,
Maybe u can include the Acess.Application to do some work:

You need to add a "project reference" to Access. Click [Project] > [References].
Select "M'soft Access 8.0 Object Library"!
p.s - your may have different version of Access. (Access 8.0 is for the MS Access 97)

In ur code:
Dim appAccess As Access.Application



MilkTin
http://go.to/cyberprogrammer         
0
 
LVL 50

Expert Comment

by:Ryan Chong
ID: 6185485
Hi Steve,here is a link from MSDN shows how to use OpenReport Method in Access, hope it's useful:

http://msdn.microsoft.com/library/officedev/office97/output/F1/D2/S5A192.HTM
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 6185731
0
 

Author Comment

by:steve_mills
ID: 6189399
I have managed to get some of these to work but you seem to need access on your PC. I am hoping you can open a report with out having a full version of access on your PC to.

Thanks
Steve



0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 6190611
You absolutely need to install Access on these computers to use its reports feature. It is like using Word or Excel, you need to have them installed.
0
 

Author Comment

by:steve_mills
ID: 6193435
Ok so it looks like I am taking the wrong direction. So I have a report I need to do in crysatl reports. I can produce a temp table and do it that way. But I have tried to do this with no luck. I was using sub forms in access to do what I wanted in access. Is there a function like this in crystal and if not how do I get around it.

Thanks
Steve



0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 6193496
You need the pro version of CR to be able to insert sub-reports.
0
 

Author Comment

by:steve_mills
ID: 6193556
any idea how much
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 6193563
0
 

Author Comment

by:steve_mills
ID: 6193731
It look like $500 us bit steep any other suggestions

Thanks
Steve
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 6193736
Nothing is for free!

Don't upgrade to VB6 only to use the DataReport. It won't help in your case.

If you don't want to distribute Access to all your users (which may cost more than 500$), I would definitely go with CR pro.
0
 

Author Comment

by:steve_mills
ID: 6212965
I have a version of CR pro that come with VB5 version

Product 4.6.10
CRW32 4.6.1.116

But know info on subreport in this version am I after a latter version and if so what.

Thanks
Steve
0
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 200 total points
ID: 6213984
This version is a lite version. You need to get a full version (starting with 6) to be able to use sub report.
0
 

Author Comment

by:steve_mills
ID: 6216796
Hi I have got hold of a Seagate Crystal reports Ver 8
This has the supreports in it, and I have managed to get it to do what I want with the data. But using the following nothing comes up in my program

cryRepView.DataFiles(0) = (BuildPath & gsDataBase)
cryRepView.ReportFileName = BuildPath & "reports\haz7.rpt"
cryRepView.SelectionFormula = " {HazReg.HazID} =  " + txtHazID + ""
cryRepView.Destination = crptToWindow
cryRepView.PrintReport

are there other commands I should be using, or do I have to load another ocx file and if so were can I get it and what is its name.

Thanks
Steve

P.S. Thanks for persisting with me.
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 6216802
You have plenty of samples when you install CR. Take time to look at them.
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 6263193
Any news?
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 6290106
Still alive?
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 6305152
Please maintain:

Questions Asked 35
Last 10 Grades Given A B A B A A A C B B  
Question Grading Record 29 Answers Graded / 30 Answers Received
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 6331505
The original question was about Access reports!
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6331650
It's time to clean up this topic area and that means taking care of this question. Your options at this point are:
 
1. Award points to the Expert who provided an answer, or who helped you most. Do this by clicking on the "Accept Comment as Answer" button that lies above and to the right of the appropriate expert's name.
 
2. PAQ the question because the information might be useful to others, but was not useful to you. To use this option, you must state why the question is no longer useful to you, and the experts need to let me know if they feel that you're being unfair.
 
3.  Ask Community Support to help split points between participating experts.  Just comment here with details.
 
4.  Delete the question because it is of no value to you or to anyone else.  To use this option, you must state why the question is no longer useful to you, and the experts need to let me know if they feel that you're being unfair.
 
If you elect for option 2, 3 or 4, just post comment with details here and I'll take it from there.  We also request that you review any other open questions you might have and update/close them.  Display all your question history from your Member Profile to view details.
 
PLEASE DO NOT AWARD THE POINTS TO ME.
 
____________________________________________
 
 
 
Hi Experts:
 
In the event that the Asker does not respond, I would very much appreciate your opinions as to which Expert ought to receive points (if any) as a result of this question.  Likewise, you can also suggest that I PAQ or delete the question.
 
Experts, please do not add further "answer" information to this question.  I will be back in about one week to finalize this question.
 
Thank you everyone.
 
Moondancer :)
Community Support Moderator @ Experts Exchange
 
P.S.  Engineering has been advised about the error in the comment date/time sort order.
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 6331807
I deserve the points
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6331830
Thank you, emoreau, I have force accepted and moved to the PAQ.  If Asker returns with additional need in this regard, I trust you will return to continue this collaboration.

Moondancer
Community Support Moderator @ Experts Exchange
0
 

Author Comment

by:steve_mills
ID: 6336626
I am sorry for the lack of reply to emoreau but I have been on leave and know back into it. Hope to look at this issue again next week.

Thanks
Steve
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

803 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