Please, I need help.
I have an aplication in Visual Basic 2010 and database created in Access 2003.
It's very simple database, it has two tables named 'doctors' and 'patients'.
I want to itegrate databse into VB. I used Wizzard to integrate.

Now I have Binding Navigator (with buttons Next, Previous, Add, Delete, Save),
DatagridView and Details (Label and Textbox) on the same form.

How can I make a procedure when I click a button "Add new patient", it opens a new window form or dialog form, and I get just a new window with detail view to enter data. Ofcourse, that window would have two buttons, 'Save' and 'Exit'.

When user presses "Save", data would be save into database and then form2 would close and DatagridView on form1 would refresh with new data.

The same thing for editing exsisting data in datagridview. When I click or double click on selected data in datagrid view, new window (or dialog form) will pop to edit data.

Is this somehow possible?
Cheers!!

sure it's possible, simply add more form to your project :

Project > Add New Item... > Windows Form

on your button "Add New Patient" code : Form2.Show()

you need an additional form, Windows Form , from project menu item, and call show method via form2 like form2.show() , on your button

I know how to add new form into project and how to open it with buttons. I did that.
But doesnt work...

What do you mean?

But doesnt work...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.