Change property of command button by navigating access form

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mhegazy
    New Member
    • Aug 2012
    • 19

    Change property of command button by navigating access form

    I have an access form having a command button which will perform a certain action onclick for the current record.
    I need to disable the button function by navigating the records before the current one from the form or in other words, to have the button property (enabled) = false all the time except when the current record is new only.

    this makes me thinking on how to inform access vba to navigate and if the current record is a new one, then to enable the button to perform its function, or if it is one preivouse record then to nake the button property (enabled) = false.

    Can this be performed and works?
  • zmbd
    Recognized Expert Moderator Expert
    • Mar 2012
    • 5501

    #2
    In the oncurrent event of the form
    me.newrecord will return state as bolean

    Place the code there to check and set the control state as needed.

    -z

    Comment

    Working...