A
Amit
Using Access 2K, Win XP.
~~~
Hi,
I'm opening a form (frmGroupComm - based on table
tblGroupComm) by clicking on a button in another form
(frmProject - based on table tblProject). ProjectID is the
Primary key in tblProject, and ProgramID is the Foreign
Key in both the tables.
The code for OnClick event in frmProject is:
==
DoCmd.OpenForm stDocName, , , , acFormAdd, , Me![ProgramID]
==
The code for OnOpen event in frmGroupComm is:
==
Private Sub Form_Open(Cancel As Integer)
If (OpenArgs <> "") Then
Me.cboProgramID_frmGroupComm = OpenArgs
End If
End Sub
==
frmGroupComm is based on a query that selects all the
fields from the table tblGroupComm, and the combo-
box "cboProgramID_frmGroupComm" lists the Program Names
and their IDs, and has ProgramID as the Control Source.
Error:
When I click on the button to open frmGroupComm, I get the
following error:
Run-time error '-2147352567 (80020009)':
You can't assign a value to this object.
==
I've used similar logic and code in other forms, and it
seems to be working fine, and I'm not able to figure out
why I'm getting this error, and how to fix it.
Any help will be much appreciated.
Thanks!
-Amit
~~~
Hi,
I'm opening a form (frmGroupComm - based on table
tblGroupComm) by clicking on a button in another form
(frmProject - based on table tblProject). ProjectID is the
Primary key in tblProject, and ProgramID is the Foreign
Key in both the tables.
The code for OnClick event in frmProject is:
==
DoCmd.OpenForm stDocName, , , , acFormAdd, , Me![ProgramID]
==
The code for OnOpen event in frmGroupComm is:
==
Private Sub Form_Open(Cancel As Integer)
If (OpenArgs <> "") Then
Me.cboProgramID_frmGroupComm = OpenArgs
End If
End Sub
==
frmGroupComm is based on a query that selects all the
fields from the table tblGroupComm, and the combo-
box "cboProgramID_frmGroupComm" lists the Program Names
and their IDs, and has ProgramID as the Control Source.
Error:
When I click on the button to open frmGroupComm, I get the
following error:
Run-time error '-2147352567 (80020009)':
You can't assign a value to this object.
==
I've used similar logic and code in other forms, and it
seems to be working fine, and I'm not able to figure out
why I'm getting this error, and how to fix it.
Any help will be much appreciated.
Thanks!
-Amit