Hello and Asslam o alekom!
This thread is for who wants to learn VB6, post your suggation and advises to us.

Recommended Answers

All 72 Replies

Please tell me how can i build datareports from 2 tables.I want to build a Salary Slip to give every employee at the salary payment Time.

Zebnoon1,
My suggestion for building datareport from two tables is, first you build a query with fields required for datareport. Then there should not be any problem creating datareport since its just like building datareport from single table.

thanks

Thanks for posting a new thread Zeb.

Below is a link to a full on tutorial on how to setup a datareport, add labels and textboxes to report and view and print the report. It shows you how to step by step.

http://visualbasic.freetutes.com/learn-vb6/lesson22.15.html

I hope this helps. Please mark the previous "raised" thread where you posted first, as solved so it does not stay under ananswered. Thanks. It is at - http://www.daniweb.com/forums/thread283601.html

thank u all . i am glade to see ur responses. Now i have problem to generate the report for students who have to pay due fee one by one.

Please help me i have 2 table Std(Roll_No(PK),Std_Name,Father Name,ETC) and Fee(FeeID(PK),Roll_No(FK),Due_fee,Paid_Fee,Total_Fee etc.).
i have to generate a report for due fee ,one by one std who have to pay fee,they pay monthly it will detect from Payable fee at least when he will pay all fee disappear from due fee report.

dear Anderet
this link is not so helpfull i tryed it.anyway thanks

Thanks for posting a new thread Zeb.

Below is a link to a full on tutorial on how to setup a datareport, add labels and textboxes to report and view and print the report. It shows you how to step by step.

http://visualbasic.freetutes.com/learn-vb6/lesson22.15.html

I hope this helps. Please mark the previous "raised" thread where you posted first, as solved so it does not stay under ananswered. Thanks. It is at - http://www.daniweb.com/forums/thread283601.html

No problem Zeb,

What do you have thus far. Have you started with the report as yet or are you at a total loss on where to begin? Let me know and I'll see where I can help from where you got stuck.

hello andreret!
First of all thanks lot for responding and where r u from ? secondly, I almost completed project about college management system .as i posted be4 i have to generate a Due Fee report ,tables are posted be4 (Please Scroll up to read my last post).I saved all data about Student Fee in FEE tab as i said in Fee table Roll_No is foreign key .i made two VB6 Forms 1.Add new Student 2.Monthly /semester vice fee pay form.as student Admit to college he has to pay admission fee+Advance Monthly College Fee.Student Form send data about to FEE Table and personal data to Student Table.I generated Report for first time it was ok ,But after month they entered Fee software didn't generate report of Last Fee Record of Each Roll_no.....that's problem.if u can solve it then please as soon as possible do it, I will Wait.

Hi, from South Africa.

I have attached what I think is what you needed. I took your datafields and build 3 reports upon that. Also look at the database, I have added another table as well. Is this what you were looking for?

Please note that there is no comments etc, just ask if you do not understand anything. I was a bit rushed for time on my side. You obviously need to add error trapping etc to suit your needs, this is just an outline...

Enjoy.

thank u very much i will check and will tell u.it would be so better if u had skype id we will discuss live.My Skype id is zebnoon from pakistan.

Thanks i will check it then tell u.

It is a pleasure. Unfortunately we do not have Skype at work. Too busy any ways managing my team. Good luck though. You will always find me here, or you can send me a private message, and I will help where possible.

hye Andreret and all
h r u u didn't post any other suggestion.?i checked it some thing i didnt understand?
If u have skype id will will discuss?

thank you andreret.

What is it that you are having a problem with. As I mentioned, I do not have Skype at work, and I also would not get involved with posters here at all. This is why we have Daniweb, to discuss and find solutions to problems.

Post your problem from what I have send you and I will gladly help.

Thanks.

hello all specially anderet,
i have a question ...is Setup file so important if i just made exe file to run my project?and what is difference b/n Setup file and exe file? bz i got error when i tried to make a setup file... i will be glade to see ur response..

Morning,

You will have to create a setup file for your application to work 100% on a users machine. a Normal exe might work IF they have all the vb6 run files installed on their system.

Lets presume that your application in VB6 is interacting with MS Access etc. If the user machine does not have the necessary drivers for Access, ODBC, VB6 and so forth, your application will crash right there and then. Setup takes care of these problems by installing AND including them in your app.

Does this answer your question?

Where did you encounter errors during your Setup?

i checked ur VB6 code... but i want a sql query ... qfter the full payment student name has to dis apeared from due fee report....i tried it but could not..
SELECT Student.Admission_date,Student.Student_Name,Roll_No, MAX(fee.Balance_Fee) AS PaidFee,
MIN(fee.Due_Fee) AS DueFee, fee.Total_Fee FROM Fee WHERE student.Roll_no=fee.Roll_no and
(Due_Fee > 0) GROUP BY fee.Roll_No, fee.Total_Fee,Student.Admission_date,Student.Student_Name

but it doesnt give me that result which i want...plz gude me. i have to submit this Project uurgentlly.

and what is function CDbl()?

what is porpuse of

With frmStudentFee
.txtRollNumber.Text = txtRollNumber.Text
.txtStdName.Text = txtStdName.Text
End With
?

First off, use M$ Access Query Designer Tool to create your more complex queries.
2nd, if you cannot look up CDbl in help, then do you actually have a legal copy VB?
3rd, and your right! What is the purpos of that code...

Good Luck

thax vb5 progmr ! but how can i use MS Access query in VB6?I look CDbl function i asked for what is it? plz read my last 5 posts i explained it..once again thx

it is very simple how can i built a due fee student report ? when they paid all monthly fees disappear their name from list.

Okay, for using the Query Builder in M$ Access, once you have your sample query built, you can goto view SQL view. Copy it from there and paste it into your program. You will of course have to clean it up a little and make it so that it can accept your inputs in the where clause.

Then for your display problem, once you have updated the account, you should be able to do a requery or refresh on your rs and if you have it bound to a control, that control may need to do a rebind, refresh or whatever method the control supports.

Good Luck

Morning Zeb,

If you look at the database I included, you will see that I had a field that got updated everytime that a payment has been made. If I look at your select statement above, I do assume that you update the record everytime that a student made a payment to eventually get to a student that made the full payments, i other words his balance is zero (0). Your statement will then look like this -

"SELECT * FROM student WHERE Roll_no = fee AND Due_Fee = 0 GROUP BY ...

Again, look at the tables I have included for you, this will show you the flow on what you need. To get to your question, once you have the record of a student that paid all his fees, delete the record if you like. I personally would keep the record for future reference. Just do not call it if you do not want the user to see it...

CDbl is a declared double. If you are working with currencies, there are many formats used. Lets say that you want to calculate the sum of $3, 210.53 and $1, 900.25, you will get an answer of $5, 110.78. When you are trying to do his sum in vb6, you will get an error, because it will read the commas (,), point (.) etc as well. CDbl basically removes everything except the number, do the sum and gives you an answer again (not formatted i.e. 5110.78)

Does this answer you questions?

Dear Anderet!
Thx for guidance ..But I want to keep record in Database but When Student Paid all dues their name has to disappear from DUE_FEE Report.I understood why Use CDbl() function, But how u ur currency Field Formatted they show Commas,$ sign and points?

and why u used Withevents in
Private WithEvents[/COLOR] cnFee As ADODB.Connection
Private WithEvents rsFee As ADODB.Recordset

and how i can Refresh/update record every Time I mean what kind of command?
and which u sent me it also doesnt update When we enter new Std it doesnt show new Std until we Stop Program. next time when we start then it shows new Std name and other record..Please tell me is it Possible if we add new std we want to view report with stop program if yes then how.?plz don't get bore on my questions.It is my habit,i am keeping to ask until i understand..Advance appologize..

anyway thx VB 5 p.....

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.