Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Run Time Error 424

Status
Not open for further replies.

avisram

IS-IT--Management
Nov 26, 2001
7
0
0
CA
Hi,

I'm trying to set a textbox control in a form (Me.Assignee_Email_Address) to a value returned from this function (temp_Email).

When I run this code the function is returning the value I want (based on the msgbox commands) but I am getting a runtime error 424 on the line "Set Me.Assignee_Email.Address.Value..."

Any assistance would be greatly appreciated.

Thanks.

Amyn Visram
-----------------------------------------------------------
Private Sub Assigned_Individual_LostFocus()
Dim temp_Email As String
temp_Email = ReturnEmail(Nz(Me.Assigned_Individual))
Set Me.Assignee_Email_Address.Value = temp_Email
End Sub
Function ReturnEmail(Ass_Ind As String)
Dim rst As ADODB.Recordset
Set rst = New ADODB.Recordset
rst.ActiveConnection = CurrentProject.Connection
rst.Open "Select * from SHR:Users"
Do Until rst.EOF
If rst![Full Name] = Ass_Ind Then
MsgBox rst![Full Name]
MsgBox rst![Email Address]
ReturnEmail = rst![Email Address]
End If
rst.MoveNext
Loop
End Function
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top