G
Guest
I am trying to write in visual basic a script to set the default value as the value last entered. One field is a numerical value and the other is a text value
I am trying to write in visual basic a script to set the default value as the value last entered. One field is a numerical value and the other is a text value
John Vinson said:The DefaultValue property is a text string (regardless of the field's
datatype). In a Form's AfterUpdate event use
Me!txtMyTextbox.DefaultValue = Chr(34) & Me!txtMyTextbox & Chr(34)
Chr(34) is " so this will set the DefaultValue property to
"56"
if the user types 56 into the textbox.
I used the above and it worked on one field. I tried to add another one just below it and it didn't work for that one. Can you only have one action per forms afterupdate event?
Another problem I am having is that one of my fields on this form is a field from a select query. The name for that field is break.team where the field is team and the table is break. Setting the default value using the method above will not work for this field either