H
Heiko K Stugg
I generated the standard duplicate button from Access; I used it in another
form and it works great; in this other form I can't get it to work right for
anything. I checked all the settings of what I did in the previous form and
everything is the same; however I do have a field that cannot have a
duplicate name, so I am not completely sure if that is the reason why this
isn't working.
But basically when I select the button, the record is copied but none of the
information is filled in. It's late in the day; I'm sure it's something
simple.
"allow additons and deletions is set to "Yes""
Private Sub cmdduplcable_Click()
On Error GoTo Err_cmdduplcable_Click
Dim NewCableTag As Variant
NewCableTag = InputBox("Enter a New Cable Tag:", "New Cable Tag", "XXX",
1000, 1000)
DoCmd.RunCommand acCmdSelectRecord
DoCmd.RunCommand acCmdCopy
DoCmd.RunCommand acCmdPasteAppend 'Paste Append
Me.txbDESIGN.Value = NewCableTag
Exit_cmdduplcable_Click:
Exit Sub
Err_cmdduplcable_Click:
MsgBox Err.Description
Resume Exit_cmdduplcable_Click
End Sub
form and it works great; in this other form I can't get it to work right for
anything. I checked all the settings of what I did in the previous form and
everything is the same; however I do have a field that cannot have a
duplicate name, so I am not completely sure if that is the reason why this
isn't working.
But basically when I select the button, the record is copied but none of the
information is filled in. It's late in the day; I'm sure it's something
simple.
"allow additons and deletions is set to "Yes""
Private Sub cmdduplcable_Click()
On Error GoTo Err_cmdduplcable_Click
Dim NewCableTag As Variant
NewCableTag = InputBox("Enter a New Cable Tag:", "New Cable Tag", "XXX",
1000, 1000)
DoCmd.RunCommand acCmdSelectRecord
DoCmd.RunCommand acCmdCopy
DoCmd.RunCommand acCmdPasteAppend 'Paste Append
Me.txbDESIGN.Value = NewCableTag
Exit_cmdduplcable_Click:
Exit Sub
Err_cmdduplcable_Click:
MsgBox Err.Description
Resume Exit_cmdduplcable_Click
End Sub