Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help on duplicating records with dates with input masks

Status
Not open for further replies.

snowyowl

Programmer
Dec 16, 2002
16
GB
Using Access 2000, I have been trying to duplicate a record using a button designed through wizard to copy and paste a record onto the table. I have recently changed the dates on my table to short date with an input mask. The duplicate no longer works and it says 'The command Pase/Append isn't available now'
I think old records are not allowing the old date format to copy to the new date format.
Any ideas on how to get around this.

 
Not sure what the code will look like behind your button. But you can force Access to reformat the data into the new date format.

to code will be something like format(field_being _copied,"DD/MM/YYYY")

to use this just substitute field_being_formated to the field name that you are copying.

Change the "DD/MM/YYYY" to the required date format in the new column.

If you want to post the actual code behind your button, and the old and new date formats. I will look at it and amend if i can.
 
The code behind the button looks like this
Private Sub Duplicate_Click()
On Error GoTo Err_Duplicate_Click

DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 2, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 5, , acMenuVer70 'Paste Append

Any ideas
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top