I have a form for with two subforms that I use for data entry into my trainings database. The forms and subforms are bound and the tables are related. The main form has the following properties:
Allow Edits = yes
Allow Deletions = yes
Allow Additions = yes
Allow Data entry = yes
The subforms have the following properties:
Allow Edits = yes
Allow Deletions = yes
Allow Additions = yes
Allow Data entry = no
The form and subforms work fine and I'm able to enter data correctly.
I also have a similar form (that was based on the above form with a few modifications) that I use for viewing the data only.
The properties for the view only form are:
Allow Edits = No
Allow Additions = No
Allow Deletions = No
Allow Data Entry = No
The subforms and their properties are the same as listed above.
This works fine and neither the main form nor the subforms are editable.
However, there is a command button, "Edit Record," on the footer of the main form with the following code in the On Click event:
MY PROBLEM IS the main form becomes editable, but the subforms are not. In fact the record saves as soon as I try to tab out of the last field on the main form.
How do I correct this?
Thanks.
Denise
Allow Edits = yes
Allow Deletions = yes
Allow Additions = yes
Allow Data entry = yes
The subforms have the following properties:
Allow Edits = yes
Allow Deletions = yes
Allow Additions = yes
Allow Data entry = no
The form and subforms work fine and I'm able to enter data correctly.
I also have a similar form (that was based on the above form with a few modifications) that I use for viewing the data only.
The properties for the view only form are:
Allow Edits = No
Allow Additions = No
Allow Deletions = No
Allow Data Entry = No
The subforms and their properties are the same as listed above.
This works fine and neither the main form nor the subforms are editable.
However, there is a command button, "Edit Record," on the footer of the main form with the following code in the On Click event:
Code:
Private Sub EditRecord_Click()
Me.AllowEdits = True ' Make the ViewEditTrainings form editable.
TrainingTitle.SetFocus ' Move to the TrainingTitle field.
End Sub
MY PROBLEM IS the main form becomes editable, but the subforms are not. In fact the record saves as soon as I try to tab out of the last field on the main form.
How do I correct this?
Thanks.
Denise