Copy field Data for next entry

L

Larry

I have a form that is used for data entry and it has 15
fields that the user enters
data. There are time when all the fields but the
[Equipment_ID] will be the same for the next entry.
Is there a way to copy All of those fields and have it
copied to the next record and then let the
user enter the [Equipment_ID]. I tried the Command
Button Wizard and used the copy record but
it did not give the desire effect.
 
K

Ken Snell [MVP]

You want previously entered values in a record to appear as the default
values in the next records?

Use the AfterUpdate event of each control to set the default value:

Private Sub ControlName_AfterUpdate()
Me.ControlName.DefaultValue = """" & _
Me.ControlName.Value & """"
End Sub
 
L

Larry

Ken,
This is works great.. I do have one quesiton and I hope
you can help. I there a way to code for the AfterUpdate
opeion. What I would like to do is have a Toggle button
they user activates to turn this option on.
Thanks Larry.
-----Original Message-----
You want previously entered values in a record to appear as the default
values in the next records?

Use the AfterUpdate event of each control to set the default value:

Private Sub ControlName_AfterUpdate()
Me.ControlName.DefaultValue = """" & _
Me.ControlName.Value & """"
End Sub

--

Ken Snell
<MS ACCESS MVP>

I have a form that is used for data entry and it has 15
fields that the user enters
data. There are time when all the fields but the
[Equipment_ID] will be the same for the next entry.
Is there a way to copy All of those fields and have it
copied to the next record and then let the
user enter the [Equipment_ID]. I tried the Command
Button Wizard and used the copy record but
it did not give the desire effect.


.
 
K

Ken Snell [MVP]

Sure. Assuming that your toggle button is named tglDefault:

Private Sub ControlName_AfterUpdate()
If Me.tglDefault.Value = True Then _
Me.ControlName.DefaultValue = """" & _
Me.ControlName.Value & """"
End Sub

--

Ken Snell
<MS ACCESS MVP>

Larry said:
Ken,
This is works great.. I do have one quesiton and I hope
you can help. I there a way to code for the AfterUpdate
opeion. What I would like to do is have a Toggle button
they user activates to turn this option on.
Thanks Larry.
-----Original Message-----
You want previously entered values in a record to appear as the default
values in the next records?

Use the AfterUpdate event of each control to set the default value:

Private Sub ControlName_AfterUpdate()
Me.ControlName.DefaultValue = """" & _
Me.ControlName.Value & """"
End Sub

--

Ken Snell
<MS ACCESS MVP>

I have a form that is used for data entry and it has 15
fields that the user enters
data. There are time when all the fields but the
[Equipment_ID] will be the same for the next entry.
Is there a way to copy All of those fields and have it
copied to the next record and then let the
user enter the [Equipment_ID]. I tried the Command
Button Wizard and used the copy record but
it did not give the desire effect.


.
 
L

Larry

Ken,
Thank you.
-----Original Message-----
Sure. Assuming that your toggle button is named tglDefault:

Private Sub ControlName_AfterUpdate()
If Me.tglDefault.Value = True Then _
Me.ControlName.DefaultValue = """" & _
Me.ControlName.Value & """"
End Sub

--

Ken Snell
<MS ACCESS MVP>

Ken,
This is works great.. I do have one quesiton and I hope
you can help. I there a way to code for the AfterUpdate
opeion. What I would like to do is have a Toggle button
they user activates to turn this option on.
Thanks Larry.
-----Original Message-----
You want previously entered values in a record to
appear
as the default
values in the next records?

Use the AfterUpdate event of each control to set the default value:

Private Sub ControlName_AfterUpdate()
Me.ControlName.DefaultValue = """" & _
Me.ControlName.Value & """"
End Sub

--

Ken Snell
<MS ACCESS MVP>

I have a form that is used for data entry and it has 15
fields that the user enters
data. There are time when all the fields but the
[Equipment_ID] will be the same for the next entry.
Is there a way to copy All of those fields and have it
copied to the next record and then let the
user enter the [Equipment_ID]. I tried the Command
Button Wizard and used the copy record but
it did not give the desire effect.




.


.
 

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