CMD Next (1 Viewer)

Dick7Access

Dick S
Local time
Today, 12:48
Joined
Jun 9, 2009
Messages
4,197
On the DB I have used for over 5 years I have a CMD called (cmdNext) that goes to the next record. This morning it is not working,
I have no idea where to start to diagnose the problem.

[/CODE]
Code:
Private Sub cmdNext_Click()

On Error GoTo err_handler

      If IsNull(txtNameL) Then
  MsgBox "You have already reached the Last person.", vbApplicationModal, "Remember God does Knee Mail"
                                  
          Else
                                      
     DoCmd.GoToRecord acForm, "frmMain", acNext
    DoCmd.GoToControl "txtNameL"
    
   Call CombFandS

End If
 

Gasman

Enthusiastic Amateur
Local time
Today, 16:48
Joined
Sep 21, 2011
Messages
14,044
Well I would start by walking though the code?
What record are you on, of how many, when it does not work?
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 11:48
Joined
Feb 28, 2001
Messages
26,999
Hey, Dick... I concur with Gasman's questions. I would add that "does not work" is kind of vague. We always want more specific symptoms. You know how nosey we can get. However, if this is on a form, have you disabled the ordinary navigation? if so, then (for testing purposes only), you might wish to enable the standard navigation controls. That would tell you which record you are on and would also allow you to manually do tests. You could jump to the last record and then doing a manual move-next from the nav control. It would help isolate the problem.
 

Dick7Access

Dick S
Local time
Today, 12:48
Joined
Jun 9, 2009
Messages
4,197
Hey, Dick... I concur with Gasman's questions. I would add that "does not work" is kind of vague. We always want more specific symptoms. You know how nosey we can get. However, if this is on a form, have you disabled the ordinary navigation? if so, then (for testing purposes only), you might wish to enable the standard navigation controls. That would tell you which record you are on and would also allow you to manually do tests. You could jump to the last record and then doing a manual move-next from the nav control. It would help isolate the
Sorry I wasn't clear. By doesn't work, I meant that when I hit the CMD button (cmdNext) it doesn't go to the next record. It never occurred to me to try the built in navigation controls. That’s why said I didn’t know where to start. Just tried them. On (navigation controls) Last record works, first record works, but next record doesn’t work. Yes, its on a form, that has queries for 7 different categories. No matter what query I have sorted the form, next button (on form) or navigation controls will not advance to next record.
 

Users who are viewing this thread

Top Bottom