D
darien.watkins
I have a form with a listbox. I have a subform below bound to the
recordset of the listbox. I want to be able to click on the row and
push an edit button to have the selected record shown in the subform
below for editing. I'm doing something like this on the edit button:
Private Sub CommandButton_Click()
Dim ID As Integer
Me!SubForm.SetFocus
DoCmd.GoToRecord , , acGoTo, ID
End Sub
The problem is the ID I'm passing and the ID it's pulling aren't the
same thing. If the ID I'm trying to pull is too high, I will get a
Run-Time error 2105 - You can't go to the specified record. If it's
below that threshold, I just get the wrong record.
What am I missing here?
Darien
recordset of the listbox. I want to be able to click on the row and
push an edit button to have the selected record shown in the subform
below for editing. I'm doing something like this on the edit button:
Private Sub CommandButton_Click()
Dim ID As Integer
Me!SubForm.SetFocus
DoCmd.GoToRecord , , acGoTo, ID
End Sub
The problem is the ID I'm passing and the ID it's pulling aren't the
same thing. If the ID I'm trying to pull is too high, I will get a
Run-Time error 2105 - You can't go to the specified record. If it's
below that threshold, I just get the wrong record.
What am I missing here?
Darien