Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > General > Need some help


Reply
 
Thread Tools Display Modes
  #1  
Old 03-20-2003, 01:09 AM
cherryk cherryk is offline
Newcomer
 
Join Date: Mar 2003
Posts: 6
Red face Need some help


Hey..

im still trying to figure this problem out. Basically if you look at the images below..
MAINFORM
http://www.geocities.com/dio_0ip/mainform.jpg

ADDFORM
http://www.geocities.com/dio_0ip/addform.jpg



There is the main form and add form.. the fields in the main form are locked and the only way to add new Id, customer is to click "Add".

The code behind the add button is simply an 'Add.show'..

The add form then shows prompting the user for new data.
'Save' is clicked and the data is to be saved to the already created array, and a .txt file.

The txt file has already been created with 2 records which are to come up on the form_load of the main form.

I basically need some awesome person here to show me how to do all of this this .. ive been stumped for about 3 days now :/ its driving me nuts..


cherry
Reply With Quote
  #2  
Old 03-20-2003, 01:13 AM
Pookie's Avatar
Pookie Pookie is offline
Gaming God

Retired Leader
* Expert *
 
Join Date: Feb 2002
Location: Brisbane, Australia
Posts: 2,363
Default

Why not just use a public variable instead of saving the data to a file then loading it again?
Reply With Quote
  #3  
Old 03-20-2003, 01:16 AM
cherryk cherryk is offline
Newcomer
 
Join Date: Mar 2003
Posts: 6
Default

Quote:
Originally Posted by Pookie
Why not just use a public variable instead of saving the data to a file then loading it again?
thats how ive been told to do it.
Reply With Quote
  #4  
Old 03-20-2003, 01:21 AM
Pookie's Avatar
Pookie Pookie is offline
Gaming God

Retired Leader
* Expert *
 
Join Date: Feb 2002
Location: Brisbane, Australia
Posts: 2,363
Default

There is another way to do it.

You can make one of the subs in the form public, then call it from the add form before closing it:

frmmain:

sub AddPerson(Id as string, Name as string)
' add the data
end sub

frmadd

call frmmain.addperson("12345","pooks")
Reply With Quote
  #5  
Old 03-20-2003, 01:54 AM
joesatri joesatri is offline
Newcomer
 
Join Date: Mar 2003
Posts: 4
Default

Also, when u need help, it's good to use the 'subject' field to describe what u need..
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
 
 
-->