G
Guest
I am getting the object required error on the indicated line in the code
shown below. Can anyone tell me what I am doing wrong?
'---------------------------------------------------------------------------------------
' Procedure : find_related_Click
' DateTime : 12/28/2006 13:39
' Author : rosensan
' Purpose : open a window showing the list of items with the same street
or last name
'---------------------------------------------------------------------------------------
'
Private Sub find_related_Click()
Dim xsortkey As Control
Dim recordkey As String
On Error GoTo find_related_Click_Error
If find_related = 1 Then
xsortkey = LastName <=======
recordkey = LastName.Value
Else
xsortkey = [street/location]
recordkey = [street/location].Value
End If
Call Form_Switchboard.OpenRelated(xsortkey, recordkey)
find_related_Click_exit:
On Error GoTo 0
Exit Sub
find_related_Click_Error:
MsgBox "Error " & Err.Number & " (" & Err.Description & ") in procedure
find_related_Click of VBA Document Form_Form1"
Resume find_related_Click_exit
End Sub
shown below. Can anyone tell me what I am doing wrong?
'---------------------------------------------------------------------------------------
' Procedure : find_related_Click
' DateTime : 12/28/2006 13:39
' Author : rosensan
' Purpose : open a window showing the list of items with the same street
or last name
'---------------------------------------------------------------------------------------
'
Private Sub find_related_Click()
Dim xsortkey As Control
Dim recordkey As String
On Error GoTo find_related_Click_Error
If find_related = 1 Then
xsortkey = LastName <=======
recordkey = LastName.Value
Else
xsortkey = [street/location]
recordkey = [street/location].Value
End If
Call Form_Switchboard.OpenRelated(xsortkey, recordkey)
find_related_Click_exit:
On Error GoTo 0
Exit Sub
find_related_Click_Error:
MsgBox "Error " & Err.Number & " (" & Err.Description & ") in procedure
find_related_Click of VBA Document Form_Form1"
Resume find_related_Click_exit
End Sub