Repeating value to next record

M

Marie

Using Access 2000. I need to repeat the value of a control
from one record to the next new record for about 10
controls on my form, then when the company number changes,
I need to get a form with all controls blank except the
ones that have default values. I know how to repeat a
value with Ctrl ", but having it be automatic would be
nice.

Thanks!

Marie
 
P

Paul Overway

Use the AfterUpdate event for the control and set it's default value to the
current value. It appears that you have some conditions related to this,
and they aren't very clear, so, you;ll need to provide more info or sort it
out yourself.

Me.txtSomeControl.DefaultValue = Chr(34) & me.txtSomeControl & Chr(34)
'For string data
Me.txtSomeControl.DefaultValue = Me.txtSomeControl 'For numeric data
 
M

Marie

I found Knowledge Base Article 210236 which is what I am
trying to do; however, when I try it I get this error:
"Expected line number or label or statement or end of
statement"
I cut and pasted the code. I didn't see any place in the
code to substitute my names, etc.

What am I doing wrong?

Thanks!
 
M

Marie

Paul,
Thanks for the reply, but I didn't understand your answer
at all; however, I found Knowledge Base Article 210236
which is what I am trying to do; however, when I try it I
get this error:
"Expected line number or label or statement or end of
statement"
I cut and pasted the code. I didn't see any place in the
code to substitute my names, etc.

Can you tell me what I am doing wrong?
-----Original Message-----
Use the AfterUpdate event for the control and set it's default value to the
current value. It appears that you have some conditions related to this,
and they aren't very clear, so, you;ll need to provide more info or sort it
out yourself.

Me.txtSomeControl.DefaultValue = Chr(34) & me.txtSomeControl & Chr(34)
'For string data
Me.txtSomeControl.DefaultValue =
Me.txtSomeControl 'For numeric data
 

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