By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,815 Members | 1,152 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,815 IT Pros & Developers. It's quick & easy.

Default values on a databound form

P: n/a
I have an access table Vehicles. There is a field Purchase Price, which has
a default value of zero.
In my databound form, I didn't include the purchase price. Now when I save,
the PurchasePrice is null. Likewise for other fields that were not on the
form.

How do I prevent vb.net from over writing the default values?
Thanks
Vayes
Nov 21 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Hi,

Any default values you set in access are not transfered to your
dataset. I would set the datacolumns default value.

ds.Tables("Employees").Columns.Item("Price").Defau ltValue = 0

Ken
-------------------
"Vayse" <Va***@nospam.nospam> wrote in message
news:ez**************@TK2MSFTNGP12.phx.gbl...
I have an access table Vehicles. There is a field Purchase Price, which has
a default value of zero.
In my databound form, I didn't include the purchase price. Now when I
save, the PurchasePrice is null. Likewise for other fields that were not
on the form.

How do I prevent vb.net from over writing the default values?
Thanks
Vayes

Nov 21 '05 #2

P: n/a
Vayse,

Use for this kind of operations the binding events.

You see them in use in the bottom of this sample on our website

http://www.windowsformsdatagridhelp....9-4deb7fa4a0b8

I hope this helps,

Cor
Nov 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.