On the first form I have a button with the following OnClick event :
Private Sub Rispondi_Click()
acbReceiveMail
On Error GoTo Err_Rispondi_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmSendMail"
DoCmd.OpenForm stDocName, , , stLinkCriteria, , , Me.txtFrom
Exit_Rispondi_Click:
Exit Sub
Err_Rispondi_Click:
MsgBox err.Description
Resume Exit_Rispondi_Click
End Sub
On the form opened upon click ("frmSendMail") I am trying to populate the "cboTo" combobox with the "txtFrom" value from first form. In the OnLoad event I have written :
Private Sub Form_Load()
Me.cboTo = Me.OpenArgs
End Sub
Anyway after clicking the button that should open "frmSendMail" I get a popup saying : "An expression you entered is the wrong data type for one of the arguments" (run-time error '2498')
Any hint ??