Results 1 to 6 of 6

Thread: Access Questions

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2003
    Posts
    13

    Access Questions

    Hello all,

    I wonder if you could point me in the right direction with the following questions, I am building an application with a Access backbone:

    1. I want to create a button that can be clicked to create a blank new form.
    2. A button to delete the current form.

    Your help would be appreciated.

    Adrian Harris

  2. #2
    Hyperactive Member
    Join Date
    Apr 2003
    Location
    Three Rivers, MI
    Posts
    354
    I may be misunderstanding your question but this will open a new blank form.
    Code:
        Private Sub Button4_Click(ByVal sender As System.Object, _
            ByVal e As System.EventArgs) Handles Button4.Click
    
            ' Create new instance of a form and then show it.
    
            Dim frmNew As New Form
            frmNew.Show()
    
        End Sub
    If you have a prebuilt form you would like to open you would name it in the Dim statement like this. Dim frmNew As New myForm. That assumes your prebuilt form is named myForm.

    To close the current form you would do this.
    Code:
        Private Sub Button5_Click(ByVal sender As System.Object, _
            ByVal e As System.EventArgs) Handles Button5.Click
    
            ' Close current form
            Me.Close()
    
        End Sub

  3. #3

    Thread Starter
    New Member
    Join Date
    Oct 2003
    Posts
    13
    Thanks for the help.

    What I am after is the code to delete and create new lines in the Access database.

  4. #4
    Hyperactive Member
    Join Date
    Apr 2003
    Location
    Three Rivers, MI
    Posts
    354
    Are you using Visual Studio.Net or Visual Basic.Net? There is a dataform wizard in both that should do all the work for you.

    You can modify the created code to work in your own projects or use it exactly the way the demo creates it.

  5. #5

    Thread Starter
    New Member
    Join Date
    Oct 2003
    Posts
    13
    I'm using Visual Basic.net. Where is the dataform wizard located?

  6. #6
    Hyperactive Member
    Join Date
    Apr 2003
    Location
    Three Rivers, MI
    Posts
    354
    In Visual Basic.Net you have to have a project open already. Under the Edit in the file menu there is a Icon that looks like an open window with smaller icons in it.

    Press that and the Add New Item menu should come up. You should see the Data Wizard Form in there. The rest is self explanitory.

    By the way, you can use VB.Net with the full version of SQL if you do the code yourself. All the wizards kinda give you the idea that you can't use SQL server with the standard version of VS. <--- Many people are not aware of that so I was just letting you know in case you didn't either.

Posting Permissions

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



Click Here to Expand Forum to Full Width