O
oliverte
Strange problem here.
When I hold down my shift key and bypass the startup sequence this
works fine.
When I open the database normally, hiding the database window, I
receive a run time error 2105, "you can't go to the specified record"
after double clicking this form control. The check box for the "PDStub"
control is checked on the record I double click, and then the 2105
error is displayed.
Here is the code from the control:
'I double click the [PDPeriodEnding] field in a record, and based on
the [site] field in the record that I double click, the procedure loops
through the remaining records (which are always sorted by [site]), and
checks every check box [PDStub] with records that have the same site.
Private Sub PDPeriodEnding_DblClick(Cancel As Integer)
Dim strCurrentSite As String
Dim strMsgBoxResult
strCurrentSite = Site 'refers to the site name in each record (sorted
by this)
strMsgBoxResult = MsgBox("Are you sure you want to mark all Per Diem
stubs received for: " & strCurrentSite & "?", vbYesNo, "Confirm All
Stubs Received")
Select Case strMsgBoxResult
Case Is = 6
Do Until Site <> strCurrentSite
PDStub = -1
DoCmd.GoToRecord , , acNext
Loop
Case Is = 7
MsgBox "Action Cancelled"
End Select
End Sub
Any ideas?
When I hold down my shift key and bypass the startup sequence this
works fine.
When I open the database normally, hiding the database window, I
receive a run time error 2105, "you can't go to the specified record"
after double clicking this form control. The check box for the "PDStub"
control is checked on the record I double click, and then the 2105
error is displayed.
Here is the code from the control:
'I double click the [PDPeriodEnding] field in a record, and based on
the [site] field in the record that I double click, the procedure loops
through the remaining records (which are always sorted by [site]), and
checks every check box [PDStub] with records that have the same site.
Private Sub PDPeriodEnding_DblClick(Cancel As Integer)
Dim strCurrentSite As String
Dim strMsgBoxResult
strCurrentSite = Site 'refers to the site name in each record (sorted
by this)
strMsgBoxResult = MsgBox("Are you sure you want to mark all Per Diem
stubs received for: " & strCurrentSite & "?", vbYesNo, "Confirm All
Stubs Received")
Select Case strMsgBoxResult
Case Is = 6
Do Until Site <> strCurrentSite
PDStub = -1
DoCmd.GoToRecord , , acNext
Loop
Case Is = 7
MsgBox "Action Cancelled"
End Select
End Sub
Any ideas?