Default Value

I

Igor G.

How to set default value in form like cell before (in same column)?
Example: if cell before have value "FORD", I want copy this value lake
default to next cell.
Thanks!
 
M

Marshall Barton

Igor said:
How to set default value in form like cell before (in same column)?
Example: if cell before have value "FORD", I want copy this value lake
default to next cell.


Cell is not a well defined term in a database. It might be
construed to have meaning in a datasheet view of a table or
query, but then there are other issues. Is the "next"
"cell" the field to the right of the current "cell" in the
same record or the same field in the next record? More
importantly, users should never interact with a table or
query in datasheet view, instead you should aways create a
form to allow users to interact with the data.

With all that in mind, you can set the default value of a
form control (text box, etc) that will be used the next time
a new record is created. This is done by using the
control's AfterUpdate event procedure to set its
DefaultValue property to the new value just entered in the
control:
Me.controlname.DefaultValue = """" & Me.controlname & """"
 
Top