|
-
Apr 12th, 2000, 04:46 PM
#1
Thread Starter
Lively Member
I am currently creating a harbour management system.
But I am facing a problem. The system is mainly designed in VB but uses an access database with four tables for the data displayed on the VB forms. On the first menu is an aerial photo of the harbour. The users have to click on individual boats and the information about that boats is retrieved and displayed in text boxes on a form.
The problem is that I need to re-use the form and am not sure how to go about retrieving the data needed to put on the form as it is different for every boat. I have thought about global variables and modules but cannot find any information on them.
Can anyone please help me before I go mentally insane!
Thanks in advance!
-
Apr 13th, 2000, 04:01 AM
#2
Member
Classes
Study up on Classes and using database connections and data retrieval in the classes, and then get the data from the class properties.
Use the VB Class Builder Utility if you need to to create the classes, and then tweak them to do what you need.
This is more advanced and requires experience doing it, but it's much better than global variables, is reusable and very efficient, but again, takes experience to not get in trouble with it. (This is working towards being a better OOP programmer).
Another option without using classes (but isn't as good as containment and reuse with classes). Since you want to reuse the Form (and Forms are classes) you can use the Public Function/Sub/Property routines to create a general purpose display form and "submit" to the form, using these routines, the information you need to display and then let the form take that information (encapsulated) and show the information.
Hope this makes sense. All you advanced gurus will probably know what I'm talking about.
Senior Systems Architect/Programmer
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|