Hello everybody!
I am new in the Access world so i would really appreciate some help.
I am currently working on a main form in Access 2010 which includes quiet a lot of fields, therefore i choose to create parts of it (which are as well optional, as they do not apply to all records) as different forms which i linked to the "mother" form afterwards through a checkbox by using the following code:
Private Sub chkMajor2_Click()
Dim strformname As String
If Me.chkMajor2 = True Then
strformname = "Major 2"
DoCmd.OpenForm strformname, acNormal
End If
continued with..
If Me.chkMajor2 = True Then
chkMajor3.Visible = True
Else
chkMajor3.Visible = False
End If
End Sub
to make the next form visible for selection after filling in the current one...something like an "add more.." field actually, which i choose to represent as checkbox. Please find bellow an image of it in case i don't explain myself good.
The issue that i encounter is that when i click the "Add New" button in the main form, it doesn't clear also the fields in the linked forms. Is it possible to do that with a VBA code? Or how should i proceed?
The current code that i have for the button is:
Private Sub cmdNew_Click()
DoCmd.GoToRecord , , acNewRec
End Sub
Thank you in advance!
Alice
I am new in the Access world so i would really appreciate some help.
I am currently working on a main form in Access 2010 which includes quiet a lot of fields, therefore i choose to create parts of it (which are as well optional, as they do not apply to all records) as different forms which i linked to the "mother" form afterwards through a checkbox by using the following code:
Private Sub chkMajor2_Click()
Dim strformname As String
If Me.chkMajor2 = True Then
strformname = "Major 2"
DoCmd.OpenForm strformname, acNormal
End If
continued with..
If Me.chkMajor2 = True Then
chkMajor3.Visible = True
Else
chkMajor3.Visible = False
End If
End Sub
to make the next form visible for selection after filling in the current one...something like an "add more.." field actually, which i choose to represent as checkbox. Please find bellow an image of it in case i don't explain myself good.
The issue that i encounter is that when i click the "Add New" button in the main form, it doesn't clear also the fields in the linked forms. Is it possible to do that with a VBA code? Or how should i proceed?
The current code that i have for the button is:
Private Sub cmdNew_Click()
DoCmd.GoToRecord , , acNewRec
End Sub
Thank you in advance!
Alice