Results 1 to 3 of 3

Thread: Hide buttons

  1. #1
    Join Date
    Dec 2009
    Posts
    6

    Unanswered: Hide buttons

    I have next record / Previous record macros on a form.

    How do I disable the next record button when I am at the last record

    Same goes for previous when I am on the first.

    Thanks, I know, rookie.

    Dave

  2. #2
    Join Date
    May 2005
    Posts
    1,191
    Well, you could use the built-in record selectors for the form, which let the user surf through the records tied to the form. But if this doesn't work for you and you still need to use your own buttons, do a test at the end and change the visible property accordingly, something like:

    Code:
    if Forms!frmName.Recordset.EOF = true then
        me.cmdName.visible = false
    else
        me.cmdName.visible = true
    endif
    air code, not guaranteed to work, but it gives you the idea.
    Me.Geek = True

  3. #3
    Join Date
    Dec 2009
    Posts
    6

    Hide Buttons

    Yeah, no luck there. The provided code stops my next record macro button from working all together.

    I tied your code to the button itself under code builder. Should that be someplace else?

    Thanks for the time anyway though.

    Dave

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •