Default entry same as previous form

  • Thread starter Thread starter Mellstock
  • Start date Start date
M

Mellstock

I am running Access 2000 on Windows XP. Is it possible to open a form
and have the default entry as the same as in the on the previous form.

I know once in the form I can press Ctrl' to achieve this.

In effect what I am asking is is it possible to program the same
effect as Ctrl' onto a field as the form is loaded / opened / scrolled
onto.

Thank you.
 
Mellstock,
Use the DefaultValue property of your field.

Private Sub SomeText_AfterUpdate()
SomeText.DefaultValue = " ' " & SomeText & " ' "
End Sub

(I've added spaces between the qoutes for clarity... remove then in your
code)
If you enter "Smith" in the field, Smith will be the default value for
all new records... until you type manually type another text value in
SomeText.
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."
 
Jan Baird is out of the country until September 20. Every effort will be
made to respond to messages, but please be patient.
 
Jan Baird is out of the country until September 20. Every effort will be
made to respond to messages, but please be patient.
 
Jan Baird is out of the country until September 20. Every effort will be
made to respond to messages, but please be patient.
 
Back
Top