S1LV3RF0X87
Registered User.
- Local time
- Yesterday, 22:57
- Joined
- Jul 7, 2017
- Messages
- 26
Hello i wonder if someone can help me as i cant seem to find an answer any where to what i need.
I have a form where a user can input data into it. I have a duplicate record function for where the user can duplicate the record as many time as they want, however when they are wanting to duplicate the same record multiple times they want a function to where they are prompted to input a set number then the duplication function then loops until it meets the criteria.
This is my duplication code
I have been trialing the inputbox command to prompt the user with the question.
Here is the code for that.
I don't know how to merge the 2 codes together and get them to work properly.
Any help on this matter would be appreciated.
I have a form where a user can input data into it. I have a duplicate record function for where the user can duplicate the record as many time as they want, however when they are wanting to duplicate the same record multiple times they want a function to where they are prompted to input a set number then the duplication function then loops until it meets the criteria.
This is my duplication code
Code:
Private Sub Command158_Click()
On Error GoTo Command158_Click_Err
' _AXL:<?xml version="1.0" encoding="UTF-16" standalone="no"?>
' <UserInterfaceMacro For="Command722" Event="OnClick" xmlns="http://schemas.microsoft.com/office/accessservices/2009/11/application"><Statements><Action Name="SaveRecord"/><Action Name="Requer
' _AXL:y"/></Statements></UserInterfaceMacro>
On Error Resume Next
DoCmd.RunCommand acCmdSelectRecord
If (MacroError = 0) Then
DoCmd.RunCommand acCmdCopy
End If
If (MacroError = 0) Then
DoCmd.RunCommand acCmdRecordsGoToNew
End If
If (MacroError = 0) Then
DoCmd.RunCommand acCmdSelectRecord
End If
If (MacroError = 0) Then
DoCmd.RunCommand acCmdPaste
End If
If (MacroError <> 0) Then
Beep
MsgBox MacroError.Description, vbOKOnly, ""
End If
Command158_Click_Exit:
Exit Sub
Command158_Click_Err:
MsgBox Error$
Resume Command158_Click_Exit
End Sub
I have been trialing the inputbox command to prompt the user with the question.
Here is the code for that.
Code:
Private Sub Command278_Click()
Dim sReturn As String
sReturn = InputBox("How many more duplicates do you require?", _
"Duplication Request")
End Sub
I don't know how to merge the 2 codes together and get them to work properly.
Any help on this matter would be appreciated.