default value

D

david

Hi,
I would like to enter a value into an inputbox, and
eventually set this value as an textbox's default value on
a form. (in order to carry over this inputbox value to a
new record)
 
J

John Vinson

Hi,
I would like to enter a value into an inputbox, and
eventually set this value as an textbox's default value on
a form. (in order to carry over this inputbox value to a
new record)

In the AfterUpdate event of the textbox put code like:

Private Sub txtNewDefault_AfterUpdate()
Me!txtOtherTextbox.Default = Chr(34) & Me!txtNewDefault & Chr(34)
End Sub

You need the quotemarks since the Default property (even for a numeric
field) is a text string.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top