Originally Posted by
AmanKaur123
Hi All
Code:
Option Compare Database
Public Sub SendAgent(frmName As String)
If MsgBox("Do you wish to send this form to " & Forms("frmCoach")!cboAgent.Column(1) & " to sign off") = vbYes Then
MsgBox "Hello"
End If
End Sub
This sub is called from the click event of a Button:
Code:
Private Sub cmdAdd_Click()
Call SendAgent("FormName")
end sub
I'd probably pass the cbo value as well, assuming it comes from the form that calls your sub.
Public Sub SendAgent(frmName As String, cboValue As String)
Call SendAgent("frmName", Me.cbo) - *handle what to do if cbo is Null* & can't recall if quotes are required for the second parameter. I think not, but I wouldn't try to concatenate them - I'd assign the control value to a variable.
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.