473,406 Members | 2,345 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

What is the alternative to copy/paste function available in Access 2003 not in 2007?

2
My purchase order system sequentially added the next number to the new order when I clicked the macro button set up with copy/paste functions and it worked well. I cannot do this now as 2007 does not offer these macro functions.

My system simply looked at the last record copied the number in the field - opened a new record and pasted the number+1.

I cannot use the autonumber function because if a record is raised and then not proceeded with I will have a missing number in the audit trail. The trail must be sequential with no missing numbers.

I am a self taught ( I think they call it discovery learning) Access user and could just do with a little (lot) bit of guidance here. Thanks in advance. Jock
Oct 7 '09 #1
5 3862
NeoPa
32,556 Expert Mod 16PB
Is it really a macro, or might it be running VBA code?

If it's code we can help you to resolve the issue. Unfortunately I cannot help with macros as I never use them. For help you would need to post what you have that's not working of course.
Oct 7 '09 #2
ChipR
1,287 Expert 1GB
You might want to use DMax.
Oct 7 '09 #3
NeoPa
32,556 Expert Mod 16PB
That's certainly what I'd suggest Chip, but if he's restricted to using simple macros that won't be possible.
Oct 7 '09 #4
Jock
2
@NeoPa
Thanks, I was wondering if there was an event procedure script using the DoComd function that would successfully do a cut/paste and increment the pasted number by one.

I need to keep it simple as my access knowledge level is limited.
Oct 7 '09 #5
NeoPa
32,556 Expert Mod 16PB
To be fair Jock, I doubt that would even suit your needs well.

What you need to do (we can help if you post enough detail) is to add one to the maximum value already held in the table for that field. This is what Chip was referring to in his post #3. It's certainly the way to go I would say.

Copying and pasting is possible (I use Copying in a database I designed for storing common posts for Bytes) but I can't think it would be appropriate here.

I'll include a doctored version of the procedure here in case it's of any use :
Expand|Select|Wrap|Line Numbers
  1. Private Sub txtCopy_Click()
  2.     With Me.txtCopy
  3.         Call .SetFocus
  4.         .SelStart = 0
  5.         .SelLength = Len(.Value)
  6.         Call DoCmd.RunCommand(Command:=acCmdCopy)
  7.     End With
  8. End Sub
Of course, even in this case, were you intending to add 1 to the current value of a control you're better off simply saying :
Expand|Select|Wrap|Line Numbers
  1. DestControl = Me.SourceControl + 1
in your code instead. This is bound to cause you problems eventually though. Use DMax() is the only sensible suggestion.
Oct 7 '09 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

121
by: typingcat | last post by:
First of all, I'm an Asian and I need to input Japanese, Korean and so on. I've tried many PHP IDEs today, but almost non of them supported Unicode (UTF-8) file. I've found that the only Unicode...
1
by: Steve | last post by:
Does anyone know a way to copy and paste or similar a list of fields in an Excel worksheet into Access to create a table? Example, Sheet1 has this list in A1 to A7: CustomerID FirstName LastName...
1
by: rummey | last post by:
Hello, I am working in Access 2003. I have a pivot table that looks very good, and if I press CTRL+A, CTRL+C while in the PivotTable View then it will be copied into memory. I can then do...
3
by: Sebastian C. | last post by:
Hello Does anyone know what owc10.dll does? In Access XP is a reference by default to owc10.dll. I know is 'Office Web Components' or something like this. I'm asking this because after applying...
13
by: John | last post by:
Hi How can I implement cut or copy or paste in code? Thanks Regards
6
by: Donald Grove | last post by:
I do programming in Access 2000 and 2003. I don't have a copy of 2003 myself, though. I have read about the adp software that comes with Access 2003, that converts an application to an access...
1
by: christianlott1 | last post by:
I want to copy an Access pivot table into word with vba. I'm guessing I'd need to Select All, copy to the clipboard, and paste special into word at a bookmark. I know how to address the...
0
by: arindams | last post by:
I've a form where an webrowser contains a html file. I want to copy a selective portion of the html content and paste that content in an excel 2007 file where it will be pasted as a normal text (not...
0
by: satish | last post by:
Jagadeesh satish@globalinfotechinc.com 217-241-2015 SUMMARY * Over Six years of experience in analysis, design, development, testing and maintenance of object-oriented programming and software...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.