A
Amit
Hi,
I have a form with a list of names and StaffID in
datasheet view. In the DoubleClick event of the name, I
have the following code:
Private Sub Staff_Name_DblClick(Cancel As Integer)
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmStaff"
DoCmd.OpenForm stDocName, , , , acFormEdit, , Me!
[StaffID]
End Sub
I'm trying to open another form (frmStaff) when the name
is double-clicked. In the FormLoad event of the
form 'frmStaff', I have the following code:
Private Sub Form_Load()
If (OpenArgs <> "") Then
StaffID = OpenArgs
End If
End Sub
This is not working. When I double-click the name, I get
the following error: "You can't assign a value to this
object.".
When I Debug the code for 'frmStaff', I see different
values for "StaffID" and "OpenArgs".
Not sure how to correct this, and will appreciate any help.
Thanks!
-Amit
I have a form with a list of names and StaffID in
datasheet view. In the DoubleClick event of the name, I
have the following code:
Private Sub Staff_Name_DblClick(Cancel As Integer)
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmStaff"
DoCmd.OpenForm stDocName, , , , acFormEdit, , Me!
[StaffID]
End Sub
I'm trying to open another form (frmStaff) when the name
is double-clicked. In the FormLoad event of the
form 'frmStaff', I have the following code:
Private Sub Form_Load()
If (OpenArgs <> "") Then
StaffID = OpenArgs
End If
End Sub
This is not working. When I double-click the name, I get
the following error: "You can't assign a value to this
object.".
When I Debug the code for 'frmStaff', I see different
values for "StaffID" and "OpenArgs".
Not sure how to correct this, and will appreciate any help.
Thanks!
-Amit