Results 1 to 4 of 4
  1. #1
    safril is offline Novice
    Windows XP Access 2007
    Join Date
    Jan 2013
    Posts
    2

    go to first record button

    dear all,

    anybody can tell me why the following code doesn't run in the go to first command button???

    Private Sub cmdAwal_Click()
    On Error GoTo Err_cmdAwal_Click


    txtkd_jabatan.SetFocus
    cmdAwal.Enabled = False
    cmdSebelum.Enabled = True
    cmdSesudah.Enabled = True
    cmdAkhir.Enabled = True


    DoCmd.GoToRecord , , acFirst


    Exit_cmdAwal_Click:
    Exit Sub

    Err_cmdAwal_Click:
    MsgBox Err.Description
    Resume Exit_cmdAwal_Click




    End Sub

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    What do you mean by 'doesn't run'? The event doesn't fire at all? Is the control's Click event property set to [Event Procedure]?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    safril is offline Novice
    Windows XP Access 2007
    Join Date
    Jan 2013
    Posts
    2
    thx for the reply but i have solved the problem....thanks any way

  4. #4
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    Probably didn't work because you had Focus set to txtkd_jabatan, which, given your code example, appears to be a Textbox, not a Command Button; your Command Buttons all appear to have the cmd prefix.

    Linq ;0)>

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 22
    Last Post: 06-12-2012, 10:02 PM
  2. Replies: 4
    Last Post: 07-22-2011, 12:52 PM
  3. Record Next Button
    By Chipper in forum Forms
    Replies: 0
    Last Post: 06-20-2011, 03:23 PM
  4. Replies: 10
    Last Post: 03-21-2011, 02:46 PM
  5. Replies: 6
    Last Post: 02-09-2010, 07:53 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums