Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB.net vs VBA

Status
Not open for further replies.

RussOSU

Technical User
Apr 16, 2001
93
US
I have taken a class on Microsoft Access. Within this class we used VBA to program forms into creating applications that we needed. I am now trying to create an application using Visual Studio.Net (VB language) because we are using an SQL server. I am by no means an even novice programmer. I would consider a newbie more advanced then me due to not using VBA for 2 years. I am currently trying to get a feel for the differences between VB.Net and VBA. I have boughten a beginning book on VB.net but that seems to be even above where I currently am. I am just trying to create an application that with the press of a button it closes the current form and opens a new form. A return to main menu button would be used to repeat this step opening the main menu form up. I remember this can be done in VBA using the Docmd.OpenForm(FormName) however I am not finding it possible to use this in VB.net. Is there a different approach I should be taking on this?

Russ
 
In VB.net forms are classes. In order to show a form you need to create an instance of the class and then tell it to show itself:
----------------------------------
Dim ShowForm as new YourFormName
ShowForm.Show 'or ShowForm.ShowDialog
----------------------------------

Sunaj
'The gap between theory and practice is not as wide in theory as it is in practice'
 
I believe you really have to understand class objects, their function and behavior, before programming in .NET Otherwise, you would have a pretty long road ahead of you if you tried developing even the simplest application.
 
Take a look at this book:
"Beginning VB.NET 2nd Edition" by Blair, Crossland, Reynolds, and Willis.
ISBN# 1-86100-761-2

KJ
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top