• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 274
  • Last Modified:

Access report from VB5.0

I would like to be able to send a varable to access from vb5.0 and print out a access report.

Thanks
Steve
0
steve_mills
Asked:
steve_mills
  • 13
  • 10
  • 3
  • +3
1 Solution
 
Ryan ChongCommented:
Hi, i think what you need is use VB5.0 to connect to the access database rather than send a variable to it.
0
 
steve_millsAuthor Commented:
How do I do this
0
 
Ryan ChongCommented:
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
What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

 
Éric MoreauSenior .Net ConsultantCommented:
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
 
steve_millsAuthor Commented:
Has anyone have a snipit of code I can look at because you guys are loosing me.

Thanks
Steve
0
 
mpaul4uCommented:
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
 
steve_millsAuthor Commented:
mpaul4u can you give me the vb5.0 comands you are talking about
0
 
milktinCommented:
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
 
Ryan ChongCommented:
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
 
steve_millsAuthor Commented:
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
 
Éric MoreauSenior .Net ConsultantCommented:
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
 
steve_millsAuthor Commented:
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
 
Éric MoreauSenior .Net ConsultantCommented:
You need the pro version of CR to be able to insert sub-reports.
0
 
steve_millsAuthor Commented:
any idea how much
0
 
Éric MoreauSenior .Net ConsultantCommented:
0
 
steve_millsAuthor Commented:
It look like $500 us bit steep any other suggestions

Thanks
Steve
0
 
Éric MoreauSenior .Net ConsultantCommented:
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
 
steve_millsAuthor Commented:
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
 
Éric MoreauSenior .Net ConsultantCommented:
This version is a lite version. You need to get a full version (starting with 6) to be able to use sub report.
0
 
steve_millsAuthor Commented:
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
 
Éric MoreauSenior .Net ConsultantCommented:
You have plenty of samples when you install CR. Take time to look at them.
0
 
Éric MoreauSenior .Net ConsultantCommented:
Any news?
0
 
Éric MoreauSenior .Net ConsultantCommented:
Still alive?
0
 
Éric MoreauSenior .Net ConsultantCommented:
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
 
Éric MoreauSenior .Net ConsultantCommented:
The original question was about Access reports!
0
 
MoondancerCommented:
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
 
Éric MoreauSenior .Net ConsultantCommented:
I deserve the points
0
 
MoondancerCommented:
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
 
steve_millsAuthor Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Easily Design & Build Your Next Website

Squarespace’s all-in-one platform gives you everything you need to express yourself creatively online, whether it is with a domain, website, or online store. Get started with your free trial today, and when ready, take 10% off your first purchase with offer code 'EXPERTS'.

  • 13
  • 10
  • 3
  • +3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now