Avatar of taz8020
taz8020
Flag for United Kingdom of Great Britain and Northern Ireland asked on

Open form in addnew record mode vb.net win form

Hi this should be quite simple
I have form1 with a datagrid. At the moment when someone clicks on a cell on datagrid view it filters a form2 then opens it. which works great.

However I now want a button to add a new product. So I  instead of using filter the form I want it to go to the add new record,
basically just do the same thing as clicking on the yellow cross in the navigation bar but in code
Windows OS.NET Programming

Avatar of undefined
Last Comment
13598

8/22/2022 - Mon
13598

bindingsource.addnew ?
taz8020

ASKER
Hi 13598
I tried productsbindingsource.addnew but just went to the first record. do you no why this would this happen.
13598

Could you put it in a try/catch statement and see if it gives you a clue, as in:
try
 productsbindingsource.addnew
catch ex as exception
messagbox.show(ex.tostring)
end try
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
ASKER CERTIFIED SOLUTION
13598

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
taz8020

ASKER
I cannot get over how many times i get stuck on something so simple, and i try every thing else. Thanks
13598

You are welcome. We've all been there.I'm glad it was simple.