By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,949 Members | 890 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,949 IT Pros & Developers. It's quick & easy.

Repeat last entry

P: n/a
I have several fields on a form that may need to carry over the data
from the previous entry. At the moment I have SendKeys "^"(')",True in
a function. This function is then called in the various fields that
need it. However, I now understand that the use of SendKeys is
questionable. I look after about 15 DB's with this code in it and
would like to avoid any trouble, as we intend to migrate from Access
97 to Access 2000. Is there any other code I could use in its place?
Bearing in mind that not ALL the fields on a form need the data
duplicating in the next record.

David
Nov 12 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
I would use a button with an event that saves the content from the
desired fields or text boxes into Dim'd variable(s) and then drop it
(them) in where it (they) belong.

You didn't specify that you're copying data between records, but I
expect you are. If so, you should be able to use
DoCmd.GoToRecord acActiveDataObject, , acNext
or - more likely to be useful -
DoCmd.GoToRecord acActiveDataObject, , acNewRec
and then drop the value into the appropriate text box.

Of course you'll set up several variables for these as needed, and drop
the values in where they belong. Works like a charm.

You do have to take care of any required fields or invalid data, or any
situation in the record you're leaving that isn't allowable before you
move to the next record.

Bruce Pick

David Neagle wrote:
I have several fields on a form that may need to carry over the data
from the previous entry. At the moment I have SendKeys "^"(')",True in
a function. This function is then called in the various fields that
need it. However, I now understand that the use of SendKeys is
questionable. I look after about 15 DB's with this code in it and
would like to avoid any trouble, as we intend to migrate from Access
97 to Access 2000. Is there any other code I could use in its place?
Bearing in mind that not ALL the fields on a form need the data
duplicating in the next record.

David

Nov 12 '05 #2

P: n/a

Thanks Bruce. I hadn't thought of that method. I will give it a try.

David

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.