473,472 Members | 1,727 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Program in Visual Basic 6?

26 New Member
First, I want to apologize for sharing my problem to you...& for bothering..although sharing is good..x)

Second, This is an enrollment system. I made a 3 tables in MS ACCESS 2007 database.

i used DATAENVIRONMENT in connecting it in the DATAGRID..

3rd, is my Problem...

table1 for student information (no problem) FORM1 in vb6
table2 for course and subjects (no problem) FORM2 in vb6
table3 for combination of student info. and course and subjects (MY BIG PROBLEM) FORM3 in vb6

I mean, in assigning the "course" and the "subjects" for a "student" who want to enroll...

(form1+form2=form3)

I hope you understand my problem.. i want a code or if you have sample related to this matter, and you may send it at psyvanz@emailremoved.com

HELP ME ASAP... PLEASE... I hope you will share it for FREE...

Your help is much appreciated...

Thanks in advance... GOD bless...

below i attached my form1/2/3 to understand my problem...
Attached Images
File Type: jpg PROB.jpg (21.0 KB, 689 views)
Nov 3 '09 #1
2 1928
Guido Geurs
767 Recognized Expert Contributor
Dear,

Is this a solution?

Project with 2 forms and each a textbox:
Expand|Select|Wrap|Line Numbers
  1. Form1 with textbox with name = F1Text1
  2. Form2 with textbox with name = F2Text1
  3.  
to copy the contents of F1Text1 to F2Text1 (for you form 1 and 2 to form 3)

=====================================
Expand|Select|Wrap|Line Numbers
  1. Private Sub F1Text1_Change()
  2. Form2.F2Text1.Text = F1Text1.Text
  3. End Sub
  4.  
  5. Private Sub Form_Load()
  6. Form2.Show
  7. End Sub
  8.  
=================================

br,
Nov 4 '09 #2
Guido Geurs
767 Recognized Expert Contributor
dear,

I have tried to simulate your problem with a listbox.
It works for me.

Add to my previous example:
command = com_down
command = com_up
listbox = list1

this is the new code=
=========================================
Expand|Select|Wrap|Line Numbers
  1. Option Explicit
  2. Dim LISTINDEX As Integer
  3.  
  4.  
  5. Private Sub Form_Load()
  6. Dim i As Integer
  7.    Form2.Show
  8. '§ populate listbox
  9.    For i = 1 To 9
  10.       List1.AddItem i
  11.    Next
  12. '§ put 1e record in textbox
  13.    F1Text1.Text = List1.List(0)
  14.    LISTINDEX = 0
  15. End Sub
  16.  
  17. Private Sub Form_Unload(Cancel As Integer)
  18. Dim i As Integer
  19.    On Error GoTo FOUT_STOPPEN
  20.    For i = Forms.Count - 1 To 1 Step -1
  21.       Unload Forms(i)
  22.    Next
  23. FOUT_STOPPEN:
  24. End Sub
  25.  
  26. Private Sub F1Text1_Change()
  27.    Form2.F2Text1.Text = F1Text1.Text
  28. End Sub
  29.  
  30. Private Sub Com_down_Click()
  31.    If LISTINDEX = 0 Then
  32.       MsgBox (" You are on the first item ")
  33.    Else
  34.       LISTINDEX = LISTINDEX - 1
  35.       F1Text1.Text = List1.List(LISTINDEX)
  36.    End If
  37. End Sub
  38.  
  39. Private Sub Com_up_Click()
  40.    If LISTINDEX = List1.ListCount - 1 Then
  41.       MsgBox (" You are on the last item ")
  42.    Else
  43.       LISTINDEX = LISTINDEX + 1
  44.       F1Text1.Text = List1.List(LISTINDEX)
  45.    End If
  46. End Sub
  47.  
  48.  
=====================================

I have tried to find the control with "dataenvironment" but can't find it !
VB help says it is from FoxPro ????



br,
Attached Files
File Type: zip data from form1 to form2.zip (2.0 KB, 61 views)
Nov 20 '09 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

21
by: Roy Riddex | last post by:
Hi I'm wanting to create a cd-rom which boots automatically when it's inserted into the computer. What I hope to achieve is for a VB6 program to run automatically when the cd boots up. Can this...
27
by: xeys_00 | last post by:
I'm a manager where I work(one of the cogs in a food service company). The boss needed one of us to become the "tech guy", and part of that is writing small windows programs for the office. He...
8
by: Fabrizio Cyber | last post by:
Hi all, I want to use a .js into a visual basic project. How can I do it ? I've tried to open the script code into my project....and then ??? I see the code but I don't jnow how to make it...
1
by: Vlad | last post by:
I am trying to decide whether I should buy Visual Basic.NET Standard. I’d like to know the answer to the following questions to help me decide 1. Can I use Visual Basic.NET Standard to create a...
8
by: Frank Callone | last post by:
Until now I programmed a lot with C++ and Java. Now I want (have) to do some programming with Visual Basic. Which software do I need for this ? Which is the best GUI development tool for Visual...
4
by: RICHARD BROMBERG | last post by:
I am writing an application ising Access 2000. I bought a copy of Microsoft Office 2000 Developer Edition so I could compile a distribute an executable copy of my application. I also have MS...
9
by: eclipsme | last post by:
Is it possible to take a VB program and run it from the Web? Any pointers/help would be very appreciated! Thanks, Harvey
2
by: vfiles | last post by:
Hi Sir.. Actually about my concern, i was able to create all those stuff creating program involving MSACCESS, unfortunately that was 4 years ago. The thing is i forgot how to program visual basic...
7
by: Jwe | last post by:
Hi, I've written a program which has both a command line interface and Windows form interface, however it isn't quite working correctly. When run from command line with no arguments it should...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.