Repeating value to next record

  • Thread starter Thread starter Marie
  • Start date Start date
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
 
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
 
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!
 
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
 
Back
Top