Welcome to Dream.In.Code
Become a VB.NET Expert!

Join 150,046 VB.NET Programmers for FREE! Get instant access to thousands of VB.NET experts, tutorials, code snippets, and more! There are 1,679 people online right now. Registration is fast and FREE... Join Now!




setting data field values before inserting or updating

 
Reply to this topicStart new topic

setting data field values before inserting or updating

castlegrpsf
22 Feb, 2008 - 12:03 PM
Post #1

New D.I.C Head
*

Joined: 22 Feb, 2008
Posts: 1

I have a windows application that needs to set some values for either insertion or updating a database.

The database fields are all bound to a form control.

The value that needs to be stored cannot be determined until the person is ready to save the data entered or updated.

The value is computed based on the data that has been entered in other fileds.

How can I get the fields set before the data is saved.

I have tried field validation but this will not work since the data is not calculated until all the data is entered.

The form Me.Validate method does not seem to invoke the forms validaing event.

If I try to use the rowchanging event, it won't let me save the values in the row because it is changing. The rowchanged event is tool late.

This is the equivalent of an Access form Before update event. But I can't seem to make VB.NET perform it
User is offlineProfile CardPM
+Quote Post

bhandari
RE: Setting Data Field Values Before Inserting Or Updating
25 Feb, 2008 - 12:22 AM
Post #2

D.I.C Addict
Group Icon

Joined: 31 Jan, 2008
Posts: 747


Dream Kudos: 900
My Contributions
provide your code within

[*code] your code [/*code] tags

(without astericks)
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/8/09 10:08PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live VB.NET Help!

VB.NET Tutorials

Reference Sheets

VB.NET Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month