danikuper
Registered User.
- Local time
- Today, 09:10
- Joined
- Feb 6, 2003
- Messages
- 147
Hi there,
I have a button on my main form to open a subform. I have in the subform's 'on open' event the following code:
Private Sub Form_Open(Cancel As Integer)
If IsNull(Me!CampaignID) Then
Me!CampaignID = Forms![frmCampaign]![CampaignID]
End If
If Me!CampaignID = "0" Then
Me!CampaignID = Forms![frmCampaign]![CampaignID]
End If
End Sub
The problem is that I receive an error message every time the subform is opening saying:
"You can't assign a value to this object".
Any idea of how to overcome this? I must be doing something wrong... can't I assign a value to a bound field based on another field on my main form??
Thanks!!
I have a button on my main form to open a subform. I have in the subform's 'on open' event the following code:
Private Sub Form_Open(Cancel As Integer)
If IsNull(Me!CampaignID) Then
Me!CampaignID = Forms![frmCampaign]![CampaignID]
End If
If Me!CampaignID = "0" Then
Me!CampaignID = Forms![frmCampaign]![CampaignID]
End If
End Sub
The problem is that I receive an error message every time the subform is opening saying:
"You can't assign a value to this object".
Any idea of how to overcome this? I must be doing something wrong... can't I assign a value to a bound field based on another field on my main form??
Thanks!!