Results 1 to 7 of 7
  1. #1
    kewelch is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2013
    Posts
    13

    Need VBA code/"Class Object" for a bound form

    Hi,
    I am running into what I'm sure is a simple issue. I created a bound form to a table after adding some additional fields, but the new form does not have any functionality other than being able to enter data on that given record. I want to see the vba code to create the tasks this form should do, like Private Sub Form_Open, and command button functions.



    Kevin

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    Please tell us in plain English WHAT you are trying to do --business terms, not Access and tables and bound forms.

  3. #3
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Also, a form created from scratch wouldn't have any VBA code, but to create some (or view existing) this is where you'd go:

    http://www.baldyweb.com/FirstVBA.htm
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  4. #4
    kewelch is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2013
    Posts
    13
    @orange "I want to see the vba code to create the tasks this form should do", not plain enough?

    Since the form didn't have any vba code, the class object of the form didn't exist under Database Tools > Visual Basic. Thanks pbaldy, all I had to do was Design View > Property Sheet > Event Tab > Code Builder (of any event). Thanks!

  5. #5
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Happy to help.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  6. #6
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    create the tasks this form should do
    this is the unclear part.

    As Paul has shown, there are a number of events related to a Form, and its Controls. You can create code for these events to perform tasks, adjust values, clear contents etc as needed in your particular application.

    Glad you have it sorted out.

    You may find this link interesting/useful
    http://office.microsoft.com/en-ca/ac...005186761.aspx

  7. #7
    kewelch is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2013
    Posts
    13
    Thank you for clarifying your previous comment. I am VERY new to access and I have difficulty communicating what it is I need to do. Any formal documentation is helpful, and advice is greatly appreciated. Thanks @orange

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

Similar Threads

  1. Replies: 1
    Last Post: 03-14-2013, 12:39 PM
  2. Replies: 1
    Last Post: 04-10-2012, 08:48 AM
  3. Replies: 0
    Last Post: 01-11-2012, 12:34 PM
  4. Replies: 9
    Last Post: 05-19-2011, 12:08 PM
  5. Replies: 3
    Last Post: 03-21-2011, 05:29 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