R
RipperT
I have two forms: frmCharges and frmAdSeg. frmCharges has a field ChargeID
that, when double clicked should open the frmAdSeg with the value of the
ChargeID field inserted in the ChargeID (FK) field of the frmAdSeg. The code
for frmCharges.ChargeID is:
Private Sub ChargeID_DblClick(NewData as String, Cancel As Integer)
DoCmd.OpenForm "frmAdSeg", , , , acFormAdd, acDialog, NewData
Response = acDataErrContinue
End Sub
The code for frmAdSeg is:
Private Sub Form_Open(Cancel As Integer)
Dim strChargeID As String
strChargeID = Forms!frmAdSeg.OpenArgs
If Len(strChargeID) > 0 Then
DoCmd.GoToControl "ChargeID"
Me.ChargeID.Value = strChargeID
End IF
End Sub
Double clicking frmCharges.ChargeID produces an error: Procedure declaration
does not match the description of the event or procedure having the same
name.
I have similar code elsewhere in the DB between two forms and it works fine.
The only difference is that ChargeID is an Integer field, but the other form
uses a text field. This maybe the significant difference, but I don't know
how to make it work. Not too well versed in VB. Can someone please help?
Many thanx,
Ripper
that, when double clicked should open the frmAdSeg with the value of the
ChargeID field inserted in the ChargeID (FK) field of the frmAdSeg. The code
for frmCharges.ChargeID is:
Private Sub ChargeID_DblClick(NewData as String, Cancel As Integer)
DoCmd.OpenForm "frmAdSeg", , , , acFormAdd, acDialog, NewData
Response = acDataErrContinue
End Sub
The code for frmAdSeg is:
Private Sub Form_Open(Cancel As Integer)
Dim strChargeID As String
strChargeID = Forms!frmAdSeg.OpenArgs
If Len(strChargeID) > 0 Then
DoCmd.GoToControl "ChargeID"
Me.ChargeID.Value = strChargeID
End IF
End Sub
Double clicking frmCharges.ChargeID produces an error: Procedure declaration
does not match the description of the event or procedure having the same
name.
I have similar code elsewhere in the DB between two forms and it works fine.
The only difference is that ChargeID is an Integer field, but the other form
uses a text field. This maybe the significant difference, but I don't know
how to make it work. Not too well versed in VB. Can someone please help?
Many thanx,
Ripper