Hi:
I'm designing a form, in it I've done a command Buttom that it should save the captured data to an Access Database and I've wrote this code:
Private Sub Command1_Click()
If DataCombo1.BoundText = "GNP" Then
Dataenvironment1.rsGNP.AddNew
Dataenvironment1.rsGNP.Update
ElseIf DataCombo1.BoundText = "SCA" Then
Dataenvironment1.rsSCA.AddNew
Dataenvironment1.rsSCA.Update
ElseIf DataCombo1.BoundText <> "GNP" And DataCombo1.BoundText <> "SCA" Then
Dataenvironment1.rsSCA.AddNew
Dataenvironment1.rsSCA.Update
Endif
An error occurs when I try to save the data captured:
Runtime Error "3704"
Operation is not allowed when object is closed
Any tip?
Thanks
Collin79
I'm designing a form, in it I've done a command Buttom that it should save the captured data to an Access Database and I've wrote this code:
Private Sub Command1_Click()
If DataCombo1.BoundText = "GNP" Then
Dataenvironment1.rsGNP.AddNew
Dataenvironment1.rsGNP.Update
ElseIf DataCombo1.BoundText = "SCA" Then
Dataenvironment1.rsSCA.AddNew
Dataenvironment1.rsSCA.Update
ElseIf DataCombo1.BoundText <> "GNP" And DataCombo1.BoundText <> "SCA" Then
Dataenvironment1.rsSCA.AddNew
Dataenvironment1.rsSCA.Update
Endif
An error occurs when I try to save the data captured:
Runtime Error "3704"
Operation is not allowed when object is closed
Any tip?
Thanks
Collin79