Results 1 to 2 of 2
  1. #1
    washington is offline Novice
    Windows Vista Access 2007
    Join Date
    Jul 2011
    Posts
    1

    Access 2007 - Form control with VBA

    I have a form which includes a subform. I have previously used a button to open a subform of the subform and displayed the results on the form (ie not within the boundaries of the subform). The button wizard creates a link between the subform and subsubform and therfore it doesnt matter that there is no link between the form and subsubform.



    I'd like to get rid of the button and use VBA and I've tried using the visable command but I cant work out how to generate the necessary links?

  2. #2
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    what's the code behind your button?

    Could you not just use that same code in one of the EVENT properites?

    For instance let's say after you enter data in a specific field you want your second subform to open with code instead of your button (which already exists)

    you could have

    If not isnull(txtField) then
    'Execute whatever you're executing with your button now
    else
    'do whatever else you normally do
    endif

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

Similar Threads

  1. Replies: 2
    Last Post: 06-18-2011, 09:55 AM
  2. Replies: 5
    Last Post: 10-19-2010, 08:02 AM
  3. Access 2007 - Form Combo Box
    By losttrail in forum Forms
    Replies: 26
    Last Post: 09-10-2010, 09:32 AM
  4. Invalidating dropdown control on Access 2007 ribbon
    By kenwarthen in forum Programming
    Replies: 0
    Last Post: 08-16-2010, 09:29 AM
  5. Fix the size of a form in Access 2007
    By Divardo in forum Forms
    Replies: 1
    Last Post: 06-02-2009, 04:23 PM

Tags for this Thread

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