Default entry same as previous form

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.
 
A

Al Campagna

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."
 
J

Jan Baird

Jan Baird is out of the country until September 20. Every effort will be
made to respond to messages, but please be patient.
 
J

Jan Baird

Jan Baird is out of the country until September 20. Every effort will be
made to respond to messages, but please be patient.
 
J

Jan Baird

Jan Baird is out of the country until September 20. Every effort will be
made to respond to messages, but please be patient.
 

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