Openargs Not Working

  • Thread starter Thread starter JamesJ
  • Start date Start date
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
 
I imported the main form from a backup and it works ok now.
I don't recall making any changes to this, but at my age you never know.

James
 
I think something was wrong with the parent form.
I imported a form form a backup and it workd ok.

Thanks,
James
 
Back
Top