carry over field

N

New TO Access

I need to carry data over from one field in a record to the same field in a
new record. It is a memo field that contains a schedule of people attaching
to one client.

I have read the posts about setting the Default Value but that is not what I
am trying to achieve.

I want the data contained in the latest recordset of a client to carry over
into a new record but the data must be specific to the same client.

Would appreciate any assistance.

Thank you

David
 
J

John W. Vinson

I need to carry data over from one field in a record to the same field in a
new record. It is a memo field that contains a schedule of people attaching
to one client.

I have read the posts about setting the Default Value but that is not what I
am trying to achieve.

I want the data contained in the latest recordset of a client to carry over
into a new record but the data must be specific to the same client.

Would appreciate any assistance.

Thank you

David

There's something wrong with your table design, then. Storing the same
schedule redundantly in multiple records should not be necessary! What's the
structure of your tables? Why do you feel you need to copy this data?
 
N

New TO Access

The reason I need to duplicate the schedule is so I can change it on the next
record. The reason a new record is created is because of additions/deltions
to the schedule. Each record needs to store the schedule as it was at a point
in time for audit purposes.
 
L

Linq Adams via AccessMonster.com

In your form, you can use the AfterUpdate event of the control holding your
data to set the DefaultValue for the field. From that time forward, until you
either manually change the data or close your form, the data will be entered
automatically in each new record.

Private Sub YourControlName_AfterUpdate()
Me.YourControlName.DefaultValue = """" & Me.YourControlName.Value & """"
End Sub
 
L

Linq Adams via AccessMonster.com

Hit the "Submit" button too soon!

Meant to add, the code I posted gives you the means to do this, and the fact
that you're going to edit the data in the following records makes more sense,
but storing data such as schedules for multiple people in a single field
isn't the best design. The thing you have to understand, in order to
successfully use memo fields (which I have for years) is that they're
designed to hold memos, i.e. notes.

They are not designed to hold data that you will ever, in any way, shape or
form need to manipulate. This means you can't search, sort, parse or in any
way diddle with the data. If there is any conceivable chance that you will
ever need to do any of these things, the data needs to be stored in separate,
distinct fields.
 
N

New TO Access

Thank you for responding - apologies for delay I have been away.

I understand your comments in respect of memo fields but in this case it
works for me. The data is never interrogated in any way and I simply use it
to attach a schedule to a certificate. I am intrigued however as to what
alternative I have.

I have 160 companies in a scheme who on average have approximately 8 members
so I have over 1,000 names that need to be recorded.

Anyway, back to the original question, the code you provided me with didn't
work and I have tried this before. Is it anything to do with Access 2007?

Thanks
 
L

Linq Adams via AccessMonster.com

Is your file in a "trusted" location? Code does not run in 2007 unless your
database resides in a folder that has been declared a “trusted†location.

To trust your folder, click:

Office Button (top left)
Access Options (bottom of dialog)
Trust Center (left)
Trust Center Settings (button)
Trusted Locations (left)
Add new location (button)
 

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