472,374 Members | 1,341 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

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

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 3803
32,511 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
1,287 Expert 1GB
You might want to use DMax.
Oct 7 '09 #3
32,511 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
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
32,511 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

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...
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...
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...
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...
by: John | last post by:
Hi How can I implement cut or copy or paste in code? Thanks Regards
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...
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...
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...
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...
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge required to effectively administer and manage Oracle...
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific technical details, Gmail likely implements measures...
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web server and have made sure to enable curl. I get a...
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand. Background colors can be used to highlight important...
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS starter kit that's not only easy to use but also...
by: Johno34 | last post by:
I have this click event on my form. It speaks to a Datasheet Subform Private Sub Command260_Click() Dim r As DAO.Recordset Set r = Form_frmABCD.Form.RecordsetClone r.MoveFirst Do If...
by: ezappsrUS | last post by:
Hi, I wonder if someone knows where I am going wrong below. I have a continuous form and two labels where only one would be visible depending on the checkbox being checked or not. Below is the...

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.