Here is a standard process to use to code a standard VB.NET 'card' form.
It helps to have a checklist to go through so I don't miss the little things, like setting the 'maxchar' property on a text box
-
Write the data access - usually two Select statements and a Merge statement
-
Run sp_SPs and copy the code SQL data access code to the SPs class
-
Run sp_fac to create a VB class for the SQL table
- Add a 'lookup' form in VB
-
Add the form in VB
-
Set the form title
-
set the form to open 'centerscreen'
-
-
Set the border type
- On the main form,
-
add fields for each field in the database.
-
set the 'max length' property
- Add a lookup button for the main field
-
-
-
Add a button bar, add 'save', 'cancel', 'delete' buttons
-
Code the lookup button
-
Code the TextChanged events
-
Set the tab order
-
In the load event, setformstate to clean, set the focus
-
As a convenience, the complete form code is
here