vb

0 views
Skip to first unread message

sameer

unread,
Jun 24, 2008, 12:41:55 PM6/24/08
to Google Code for Educators
Hi,
friends
Can anybody help for Visual basic 6 code.....

i want to develop software.......where...............i have to print
group of records at a time.....

for example ..........let us assume that a school has many
classess......like 1st,2nd and 3rd.......so on...........
among each class they would be more then 10 students.........so my
questiong here is .................if i select any class for software
and set to print then what evert the students belongs to that class
should get print on paper........with all student details one by
one......

plz help with this........

blitz specimen

unread,
Jun 28, 2008, 8:12:14 AM6/28/08
to Google-Code-...@googlegroups.com

u can use this code i assume

for each component in frmstuded
   if type of component is textbox
   component.clear
 end if
end

SHAHID PASHA

unread,
Jun 29, 2008, 6:51:41 AM6/29/08
to Google-Code-...@googlegroups.com
hi
i want develop database applicatiion where i can print the data on paper.................
the actual problem is, assume that, a school has 10 section and each section has 10-20 students studing.............
if i want to print a student information individually  then it will take lot of time..........so my idea is if i select a section.........and select print function then whath ever student are there in that section should print on paper individually

plz send the  me the logic ..............above project would  be developed in vb6 and access

Alexandru Zbarcea

unread,
Jul 1, 2008, 5:08:45 AM7/1/08
to Google-Code-...@googlegroups.com
ok ...
u're working in VB or VBA?
I mean, only the DB is in Access, or the report too ? (do you understand what I ask)?

SHAHID PASHA

unread,
Jul 1, 2008, 7:29:20 AM7/1/08
to Google-Code-...@googlegroups.com
hi,
i want to work on vb 6 and access......as db..........
my question is how to print N records from specific category and i hope you understood................

regards
shahid

Alexandru Zbarcea

unread,
Jul 4, 2008, 3:48:00 AM7/4/08
to Google-Code-...@googlegroups.com
u may chose to create reports using:
 * access
 * crystal report
 * data utility (http://www.developerfusion.co.uk/show/1842/)

Any of these cases, the detail must be contained in a group,
The SQL (or data object) must have the records GROUPED BY the category.
Also, that SQL (or data object) must have an WHERE (or a filter) clause that will select only categories that you want. And so, the report is generated dynamically using only the date you want (provide).

hope it helps,
for more help I might send u a VB6 project example with a db attached, but that takes some time ... and you should specify the method you're using (from those 3 above, or something else).

SHAHID PASHA

unread,
Jul 4, 2008, 1:19:49 PM7/4/08
to Google-Code-...@googlegroups.com
Hi,
There !!!

thanks for giving idea.........could  you send me a sample  project if  you have else no problem i will try to get it  done anyways............


Regards
shahid
India

Alexandru Zbarcea

unread,
Jul 4, 2008, 1:52:19 PM7/4/08
to Google-Code-...@googlegroups.com
sorry,
i don't have a project (ready) ... I have to make one ... and for that I need time and details :-)

but i might help u with anything you need ...
;-)

SHAHID PASHA

unread,
Jul 5, 2008, 7:26:17 AM7/5/08
to Google-Code-...@googlegroups.com
hi,
Thanks for your support.............anyways..............i will start
developing the project......let c if i have any problem i ll contact
you........

so if i want to print groups of records then i have to use.........sql
query.................or do we have any logic in vb6...........

you know i am just looking how to print N number of records from
database.........

for example:

let us assume that i have 100 students and out of 100 students they
are 30 students who are in class 'A" and 30 students in Class "B' and
40 students in class 'C'..........
so any ways i cant bee selecting each student in class 'A' to print
details.........so what i want is.......if i select class 'A' then
all 30 students details should start printing .......
i hope you understood........

please can i know which part of world you are.................
thanks
shahid

Alexandru Zbarcea

unread,
Jul 7, 2008, 6:27:23 AM7/7/08
to Google-Code-...@googlegroups.com
If you are using VB6 u already selected ADO or DAO to interrogate the DB (access).
I presume that u use ADO ...

In this case, I presume u use the Visual Editor and u don't know what that "data source" is.
Well, that's just a connection string (the object called DatabaseConnection - if I remember well), and an SQL command, like:
"SELECT ..."

That's true, that the editor completes that SQL string for you. What you have to be aware is to complet that WHERE Clause, like:
"SELECT name, address, age, class (, ... etc)
FROM students
WHERE class=" & tbxClass.Value & "'"

so, this is the Data Source SQL String, and onto event
btnSubmitt.OnClick() (i presume your button is named btnSubmitt)

datasource.SQL = newSQL (with the new tbxValue)
datasource.Execute ... or something like that ...
... that's it!





in this case ... to populate a form/list box/ or report u have to provide a data source ...
Data source

select name, class, age (, .... etc) from
Reply all
Reply to author
Forward
0 new messages