Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"Docmd.Gotorecord" no longer functions

Status
Not open for further replies.

HFloyd

Programmer
Jun 5, 2002
71
US
Hello All,

I am using Access 2000 SP-3.

I have a form (recordsource: tblProjects), which has a subform (recordsource: tblTimesheets) linked on a ProjectID (autonumber). The subform displays as a continuous form. I had created a button in the header of the subform that would go to the last record (aka at the bottom of the subform) to quickly facilitate a new entry. For quite some time the button worked perfectly. Now it doesn't work anymore. Clicking the button does nothing, no error message is displayed. I have tried to delete and re-create the button, but it still doesn't work.

Button code is as follows:
Code:
Private Sub cmdGoToLast_Click()
On Error GoTo Err_cmdGoToLast_Click

    DoCmd.GoToRecord , , acLast
    
Exit_cmdGoToLast_Click:
    Exit Sub

Err_cmdGoToLast_Click:
    MsgBox Err.Description
    Resume Exit_cmdGoToLast_Click
    
End Sub

I have tried "Compact and Repair", but it doesn't fix the problem.

If anyone has experienced this phenomenon of code suddenly not working and knows how to fix it, I'd appreciate it.

Thanks,

Heather


[yinyang] Floyd Innovations [yinyang]
 
HF,

How do you know it is not doing what you wish. You have just moved the pointer to the recordset. To know if it did what you asked, you have now to look at the record --- or move the pointer to the recordset on the form. You really have not told us enuf to answer the question.

rollie@bwsys.net
 
Rolliee,

In the subform, there are enough records that they scroll beyond the bottom of the form. Previously, clicking the button would jump the focus to the last record at the bottom of the list and display the empty (new) record undreneath it. This no longer happens.

For instance: View when opening the form
Timesheetform1.gif


Previously, clicking the button resulted in this:
Timesheetform2.gif


Now clicking the button does not change the view:
Timesheetform1.gif


I hope this clarifies what I am attempting to do.

Thanks,

Heather

[yinyang] Floyd Innovations [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top