Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2005
    Location
    Australia
    Posts
    7

    Unanswered: Forms in Visual Basic

    Hi All,

    I have been using VBA for Access Database Programming, but I have just started using Visual Basic 2005 Express Edition, so I'm pretty much a newbie.

    I am trying to create a database program to run remotely on other computers which do not have Microsoft Access hence the need for VB Programming.

    I have a main menu form as my start up form with controls to other forms. How do I declare the form and hide the main menu and open up another form when the command button is clicked?

    I know that in Access I use the DoCmd.OpenForm "Formname"

    I also know that for VB I have to use

    formname1.Hide()
    formname2.Show()

    But I keep getting a message stating that they are not declared.

    I would really appreciate it if someone had a sample form with the sample code so that I can learn how to code.

    Haven't had that much luck in other forums, and I hope this one will be different.

    Thanks a lot in advance!

  2. #2
    Join Date
    Dec 2004
    Location
    Laguna, Philippines
    Posts
    147
    correct me if im wrong but visual basic 2005 is visual basic.NET? if it is i dont think you posted your topic in the right category..

    in .NET framework you must declare an instance of the form first before manipulating or calling the form. i usually store it in a global class so that i can manipulate it everywhere within the project. but every programmers have a diffrent style, :-)
    Give me a place to code and i shall move the earth!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •