kevinh2320
Board Regular
- Joined
- May 13, 2016
- Messages
- 61
I'm looking for code to automatically click OK or ignore the parameter query dialog box when it comes up. The code below is ran off a form button on a on-click event. Everything works except I'm prompted with the parameter dialog box. The code copies the customers name to the clipboard so I don't have to paste or enter when prompted. I just have to click OK. Looking for code to automate.
Private Sub openCustomerFrm_Click()
Me.custName.SetFocus
DoCmd.RunCommand acCmdCopy
DoCmd.OpenForm "customerHomeFrm"
' Me.custNameSetFocus
' DoCmd.RunCommand acCmdCopy
' DoCmd.OpenForm "salesFrm"
' Me.custName.SetFocus
' DoCmd.RunCommand acCmdPaste
End Sub
Private Sub openCustomerFrm_Click()
Me.custName.SetFocus
DoCmd.RunCommand acCmdCopy
DoCmd.OpenForm "customerHomeFrm"
' Me.custNameSetFocus
' DoCmd.RunCommand acCmdCopy
' DoCmd.OpenForm "salesFrm"
' Me.custName.SetFocus
' DoCmd.RunCommand acCmdPaste
End Sub