Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > Database and Reporting > using 2 forms


Reply
 
Thread Tools Display Modes
  #1  
Old 11-14-2000, 06:31 PM
jrb187
Guest
 
Posts: n/a
Default using 2 forms


Hi I'm new to VB but have experience in QBasic. I am developing a database program to keep track of the members of our church using Access97 as my database. I have Form1 and Form2. Both Forms use the same database but have 2 different data controls. On Form1 I enter the name, address etc and on Form2 I enter the family tree info, children etc. I have no problem with adding new records, advancing to next record or previous record. I can search for a new record OK. My problem is when I search a new record the Form1 shows the proper info but Form2 shows the original info that was on the form before I searched. I need Form2 to have to info that goes with the new record on Form1 that I searched for. Please explain this as simple as possible as I am not that familiar with VB. I appreciate your rely,
Thanks, newvbr

Reply With Quote
  #2  
Old 11-15-2000, 12:01 PM
Fredr27
Guest
 
Posts: n/a
Default Re: using 2 forms

High!

When moving to an other record in a datacontrol an event is fired called Reposition. When this event is fired you want to move to the same record in the other datacontrol.
This sample might help you.

Private Sub Data1_Reposition()
form2.Data2.Recordset.MoveFirst
Do Until form2.Data2.Recordset("VALUE") = Data1.Recordset("VALUE")
form2.Data2.Recordset.MoveNext
Loop

End Sub


Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->