Copy field in form

vbaInet,

However from his first post I got the impression he want's to be able to edit the newly copied ones but not the old ones. I could do your way but then how would he edit the newly copied ones without some sort of *trigger* to indicate this one is editable? See what I mean?

Side note, the Form is not locked now and even if I lock it, you can still copy/paste to the new record but then the new record is not editable. That is why I am asking what determines what locks a record.

When I lock some field in properties and press button to copy all records, thats records who are locked is not copy
 
Sometimes I use blank form, sometimes I copy older data and change certain filed.
 
Hmm, I'm not sure how to explain. Let's try this...

Right now you Form is not locked, so what prevents a User from changing the data?
 
vbaInet,

However from his first post I got the impression he want's to be able to edit the newly copied ones but not the old ones. I could do your way but then how would he edit the newly copied ones without some sort of *trigger* to indicate this one is editable? See what I mean?

Side note, the Form is not locked now and even if I lock it, you can still copy/paste to the new record but then the new record is not editable. That is why I am asking what determines what locks a record.
Just throwing out ideas to get the OP thinking.

With the form's Allow Edits property set to No and Allow Additions set to Yes you can't edit already saved data but you can add new data. So what I was getting at is Copy current record (if it's not New), Move to New Record, Paste. At this point the form is in edit mode.

I've just had a look at the db and I can see the Excel like table you're talking about. :eek:
 
Just throwing out ideas to get the OP thinking.

With the form's Allow Edits property set to No and Allow Additions set to Yes you can't edit already saved data but you can add new data. So what I was getting at is Copy current record (if it's not New), Move to New Record, Paste. At this point the form is in edit mode.

I've just had a look at the db and I can see the Excel like table you're talking about. :eek:

I will try that. I know tht my db is not perfect but it's works I didn't go to school to learn access that only my hoby
 
Just throwing out ideas to get the OP thinking.

With the form's Allow Edits property set to No and Allow Additions set to Yes you can't edit already saved data but you can add new data. So what I was getting at is Copy current record (if it's not New), Move to New Record, Paste. At this point the form is in edit mode.

I've just had a look at the db and I can see the Excel like table you're talking about. :eek:

I think i dont have that options in 2007
 
That option has been around before 2007 but you need to be in Design Mode in the Properties window of the Form.
 
Some visual:
attachment.php
 

Attachments

  • Form Data properties.png
    Form Data properties.png
    10.5 KB · Views: 271
And some more visual:
attachment.php

...make sure you click the form.
 

Attachments

  • FormClick.jpg
    FormClick.jpg
    7.4 KB · Views: 132
You are correct!

vbaInet... How were you able to paste the record?
 
There are two things one can do:

1. Use the acCmdCopy and acCmdPaste or acCmdPasteAppend (don't remember which one) parameters of RunCommand method. Of course you'll need to turn off and on the Warnings (SetWarnings).
2. Use a Dictionary object, cycle through each control, get a copy, move to a new record, cycle through object again and get value.
 
There are two things one can do:

1. Use the acCmdCopy and acCmdPaste or acCmdPasteAppend (don't remember which one) parameters of RunCommand method. Of course you'll need to turn off and on the Warnings (SetWarnings).
2. Use a Dictionary object, cycle through each control, get a copy, move to a new record, cycle through object again and get value.


Where to put that, I men first thing
 
In the Click event of a button. I'll start you off:
Code:
    DoCmd.RunCommand acCmdCopy
    DoCmd.GoToRecord , , acNewRec
    DoCmd.SetWarnings False
    DoCmd.RunCommand acCmdPaste
    DoCmd.SetWarnings True
I would normally use a dictionary anyway but it's more involving. Give the above a go.
 
In the Click event of a button. I'll start you off:
Code:
    DoCmd.RunCommand acCmdCopy
    DoCmd.GoToRecord , , acNewRec
    DoCmd.SetWarnings False
    DoCmd.RunCommand acCmdPaste
    DoCmd.SetWarnings True
I would normally use a dictionary anyway but it's more involving. Give the above a go.

You mean to add button and copy this command, I try that it doesn't work
 

Users who are viewing this thread

Back
Top Bottom