C
CW via AccessMonster.com
I have the following code behind the After Update event of my Option Group:
-----------------------------------------------------------
Private Sub Frame15_AfterUpdate()
Dim strRetVal As String
Select Case Me.Frame15
Case Is = 1
strRetVal = "1"
Me.TabCtl0 = TabCtl0 + 1
Case Is = 2
strRetVal = "2"
Me.TabCtl0 = TabCtl0 + 1
Case Is = 3
strRetVal = "3"
Me.TabCtl0 = TabCtl0 + 1
Case Is = 4
strRetVal = "4"
Me.TabCtl0 = TabCtl0 + 2
Case Is = 5
strRetVal = "5"
Me.TabCtl0 = TabCtl0 + 3
Case Is = 6
strRetVal = "6"
Me.TabCtl0 = TabCtl0 + 4
End Select
Me!sfrmqryMainTeleService!Combo104 = strRetVal
End Sub
----------------------------------------------------------
Right now, the last line in my code will open up the Subform, but if a record
already exists in the Subform, it overwrites the value that is in the
Combo104 dropdown.
What I want it to do is:
1) Open the subform, create a new record using strRetVal as the value for the
Combo104 dropdown which is on my sfrmqryMainTeleService.
Hope this makes sense.
Thanks in advance for your help.
cw
-----------------------------------------------------------
Private Sub Frame15_AfterUpdate()
Dim strRetVal As String
Select Case Me.Frame15
Case Is = 1
strRetVal = "1"
Me.TabCtl0 = TabCtl0 + 1
Case Is = 2
strRetVal = "2"
Me.TabCtl0 = TabCtl0 + 1
Case Is = 3
strRetVal = "3"
Me.TabCtl0 = TabCtl0 + 1
Case Is = 4
strRetVal = "4"
Me.TabCtl0 = TabCtl0 + 2
Case Is = 5
strRetVal = "5"
Me.TabCtl0 = TabCtl0 + 3
Case Is = 6
strRetVal = "6"
Me.TabCtl0 = TabCtl0 + 4
End Select
Me!sfrmqryMainTeleService!Combo104 = strRetVal
End Sub
----------------------------------------------------------
Right now, the last line in my code will open up the Subform, but if a record
already exists in the Subform, it overwrites the value that is in the
Combo104 dropdown.
What I want it to do is:
1) Open the subform, create a new record using strRetVal as the value for the
Combo104 dropdown which is on my sfrmqryMainTeleService.
Hope this makes sense.
Thanks in advance for your help.
cw