|
-
Oct 15th, 2003, 02:29 PM
#1
Thread Starter
New Member
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
-
Oct 15th, 2003, 02:43 PM
#2
Hyperactive Member
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
-
Oct 15th, 2003, 02:52 PM
#3
Thread Starter
New Member
Thanks for the help.
What I am after is the code to delete and create new lines in the Access database.
-
Oct 15th, 2003, 03:54 PM
#4
Hyperactive Member
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.
-
Oct 15th, 2003, 05:18 PM
#5
Thread Starter
New Member
I'm using Visual Basic.net. Where is the dataform wizard located?
-
Oct 16th, 2003, 08:39 AM
#6
Hyperactive Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|