Results 1 to 2 of 2
  1. #1
    Rakib is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Mar 2014

    control command buttorn based on subform command button

    i have got a problem, i have a form which has got some combo box and some commmand button and also have a subform.
    in my subform i have some field. I need to enable or disable the command button on the mainform based on the subform field. i need disable the "Close button" while the "FruitPrice" field is null then the close button will be disable.

    i am giving an example through the attachment.

    Attached Thumbnails Attached Thumbnails null value.png  

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    'subform on current event
    sub onCurrent()
    forms!frmMain!btnClose.enabled = not Isnull([Fruitprice])
    end sub

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

Similar Threads

  1. Replies: 3
    Last Post: 08-04-2013, 07:11 AM
  2. Replies: 4
    Last Post: 10-08-2012, 05:33 PM
  3. Command button to populate subform
    By akhlaq768 in forum Forms
    Replies: 2
    Last Post: 02-07-2012, 04:57 AM
  4. Command Button Problem is Subform
    By Lupson2011 in forum Access
    Replies: 3
    Last Post: 08-25-2011, 08:39 AM
  5. Replies: 1
    Last Post: 07-27-2010, 02:27 PM

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