J
JamesJ
I'm using the following to open frmRemindersEdit to the record with
the same ReminderID. The form, frmRemindersSub is a sub form of
another form and when I click on the ID field it doesn't bring up that
record with the same ID. It opens to the first record. It works fine
when doing it directly from frmRemindersSub but not when it is the subform.
Seems like it was working before.
--------------
Private Sub ReminderID_Click()
If Not IsNull(Me.ReminderID) Then
DoCmd.OpenForm "frmRemindersEdit", OpenArgs:=Me.ReminderID
Else
DoCmd.OpenForm "frmRemindersEdit", , , , acFormAdd
End If
End Sub
------------------
This is what I have in the OnLoad of frmRemindersEdit:
---------------------
Private Sub Form_Load()
If Not IsNull(Me.OpenArgs) Then
With Me.RecordsetClone
.FindFirst "ReminderID=" & Me.OpenArgs
If Not .NoMatch Then
Me.Bookmark = .Bookmark
End If
End With
End If
Me.Reminder.SetFocusEnd Sub
the same ReminderID. The form, frmRemindersSub is a sub form of
another form and when I click on the ID field it doesn't bring up that
record with the same ID. It opens to the first record. It works fine
when doing it directly from frmRemindersSub but not when it is the subform.
Seems like it was working before.
--------------
Private Sub ReminderID_Click()
If Not IsNull(Me.ReminderID) Then
DoCmd.OpenForm "frmRemindersEdit", OpenArgs:=Me.ReminderID
Else
DoCmd.OpenForm "frmRemindersEdit", , , , acFormAdd
End If
End Sub
------------------
This is what I have in the OnLoad of frmRemindersEdit:
---------------------
Private Sub Form_Load()
If Not IsNull(Me.OpenArgs) Then
With Me.RecordsetClone
.FindFirst "ReminderID=" & Me.OpenArgs
If Not .NoMatch Then
Me.Bookmark = .Bookmark
End If
End With
End If
Me.Reminder.SetFocusEnd Sub