I made some code that works great on a single form, but doesn't work on the subform. The code checks to see if the current record is new.
Private Sub Form_Current()
Dim intnewrec As Integer
intnewrec = Forms("Training"
.NewRecord
If intnewrec = True Then
Course_not_selected = True
Else
Course_not_selected = False
End If
MsgBox Course_not_selected
Training is the subform. Edit_Course is my main form. If I try the same code from Edit Course I get "Can't find form 'Training'" If I try this from Training it works great. Can anyone help? Thanks in advance. This site is great and I have found lots of help here.
Private Sub Form_Current()
Dim intnewrec As Integer
intnewrec = Forms("Training"
If intnewrec = True Then
Course_not_selected = True
Else
Course_not_selected = False
End If
MsgBox Course_not_selected
Training is the subform. Edit_Course is my main form. If I try the same code from Edit Course I get "Can't find form 'Training'" If I try this from Training it works great. Can anyone help? Thanks in advance. This site is great and I have found lots of help here.