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

Can Not Set Databound textbox value

P: 1
I am trying to figure out how to set the default value of a bound textbox in the BindingNavigatorAddNewItem_Click event.

the code I have tried is:

Me.TextBox1.Text = "Hello World"

I am able to set the value if the textbox1 is not bound. But as soon as I bound it the "hello world" no longer displays.

Thank you for any advice you can give me.

Scott Duprey
Apr 9 '07 #1
Share this Question
Share on Google+
2 Replies

Expert 100+
P: 1,017
When text box is bound it means it shows whatever is in a database and you can't put any data in it unless you update column to which text box is bound.
When text box is unbound it means there is no data source behind it and you are free to enter anything.

Apr 9 '07 #2

Expert 5K+
P: 8,434
You would probably need to set a default value for the field in the table definition. Or, if this is an Access form, I think there is a property which sets the default value for a control.

Alternatively, depending on exactly what behaviour you're after, one of the Access form events might allow you to fill in a default before/after reading/displaying/saving the record.
Apr 10 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.