I am trying to fill main form as data is entered in subform but i am getting error
I have applied code in the subform on dirty event as under.
But TranTypeFK combo box getting blank as I change in subform and generates error.
The screenshots are attached herewith before to run the code and after.
How to fill also combo box automatically as described in the code.[/CODE]
I have applied code in the subform on dirty event as under.
Code:
Private Sub Form_Dirty(Cancel As Integer)
With Me.Parent
If IsNull(!RefPK) Then
If Me.Parent.lblReference.Caption = "Receipt" Then
Me.Parent.TranTypeFK.DefaultValue = 1
Me.Parent.TypeRef = "Test"
Me.Parent.Frame1.DefaultValue = 1
Me.Dirty = False
End If
End If
End With
End Sub
But TranTypeFK combo box getting blank as I change in subform and generates error.
The screenshots are attached herewith before to run the code and after.
How to fill also combo box automatically as described in the code.[/CODE]
Attachments
Last edited: