T
tony wong
i have the following code in the sub form
Forms!FrmApplicant!Status is the main form object
when i create a record in the main form, it is blank (not allow me to add)
in sub form.
when i go back to previous record (NOT Closed) and go forward, then the
newly created record is allowed to add in sub form.
the blank situation is only appeared when i create a new record
and at that time when i go to create the new record, i am at a "Closed"
record of the main form.
it seems the newly created record use the restriction of the previous
record.
i have been struggled at this issue for a long time. Grateful if you could
help me or give me hints to troubleshoot. Thanks a lot.
***********************************
Private Sub Form_Current()
If Forms!FrmApplicant!Status = "Closed" Then
Me.AllowEdits = False
Me.AllowDeletions = False
Me.AllowAdditions = False
Else
Me.AllowEdits = True
Me.AllowDeletions = True
Me.AllowAdditions = True
End If
End Sub
Forms!FrmApplicant!Status is the main form object
when i create a record in the main form, it is blank (not allow me to add)
in sub form.
when i go back to previous record (NOT Closed) and go forward, then the
newly created record is allowed to add in sub form.
the blank situation is only appeared when i create a new record
and at that time when i go to create the new record, i am at a "Closed"
record of the main form.
it seems the newly created record use the restriction of the previous
record.
i have been struggled at this issue for a long time. Grateful if you could
help me or give me hints to troubleshoot. Thanks a lot.
***********************************
Private Sub Form_Current()
If Forms!FrmApplicant!Status = "Closed" Then
Me.AllowEdits = False
Me.AllowDeletions = False
Me.AllowAdditions = False
Else
Me.AllowEdits = True
Me.AllowDeletions = True
Me.AllowAdditions = True
End If
End Sub