Results 1 to 14 of 14
  1. #1
    bob500000 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2011
    Posts
    15

    File system menu for access

    Hi,

    I have been working on a file system menu that will show objects in a form when the user clicks a button and when they click off it they will revert back to hidden. Below is the code I currently have, not really had much xp with VB but can understand basics.

    Private Sub helpbtn_Click()

    Me.Helpmen.Visible = True
    Me.About.Visible = True
    Me.Guide.Visible = True


    helpbtn_Click_Exit:
    Me.Helpmen.Visible = False
    Me.About.Visible = False
    Me.Guide.Visible = False
    End Sub

    Any advice would be great, ps I have looked at controls and this doesn't seem to make any sense either

    Cheers

  2. #2
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    That code is going to make them visible and then turn right around and make them invisible. From the sound of it, you want the last 3 lines in some other event. I'm not really clear on what you're trying to accomplish.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    bob500000 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2011
    Posts
    15
    Ok, so the idea is to click on a button help for example, then when you click it shows a rectangle and various buttons, once you click off the help button then the menu disappears, I know there are ways to use a toolbar but I would like to know what I am missing to solve this problem

    Cheers

  4. #4
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    The problem is that in the click event it's not going to run half the code when you click the button; it runs it all. You might try splitting the code between the mouse down and mouse up events.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    bob500000 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2011
    Posts
    15
    Cheers for that mate,

    I ended up putting each part in in focus and works a treat before I close this I have another question,

    do you know how to copy a record I know I will need to select the fields that I want to copy but am curious about the code side of it.

    Bob

  6. #6
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Any number of ways. I think the button wizard has an option for it. You can execute an append query. You can open a recordset on the target table and use the AddNew method. I'd likely use one of the last two, depending on the situation.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  7. #7
    bob500000 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2011
    Posts
    15
    Ok, will this work if it is a sub form that I have copied and pasted into another form so the data is pulled from the table but there is no sub form for it to relate to?

  8. #8
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    I don't see why not.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  9. #9
    bob500000 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2011
    Posts
    15
    ok, I am using the following:

    Private Sub Copybtn_Click()
    Me!Customer_ID.SetFocus
    DoCmd.RunCommand acCmdCopy
    End Sub

    But are still getting errors any ideas?

  10. #10
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    It's not how I'd go, but is this what you're trying to do?

    http://www.accessruncommand.com/codeex/38-50-190.htm
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  11. #11
    bob500000 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2011
    Posts
    15
    Ok, that link was helpful but I get a feeling that it will not do what I want.

    I have included a shot of the db form and as you can see the data is not contained in a sub form so I need to individually select each text box. Any ideas?


  12. #12
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    What are you trying to accomplish? If you're trying to duplicate the record, an append query that references the form for its values (or references the table using the key value of the displayed record).
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  13. #13
    bob500000 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2011
    Posts
    15
    I just want to take the data that is held in the form and store in on the clipboard so that it can be either imported into an email or word document

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

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

Similar Threads

  1. Access Menu
    By Azeez_Andaman in forum Forms
    Replies: 2
    Last Post: 11-27-2011, 07:44 PM
  2. I can't see the menu options in Ms Access 2010.
    By dave_joseph in forum Access
    Replies: 2
    Last Post: 10-27-2011, 03:11 AM
  3. Replies: 1
    Last Post: 07-30-2011, 12:42 PM
  4. Replies: 2
    Last Post: 04-12-2011, 10:14 AM
  5. Access 2007 menu bar, toolbar...
    By truthseeker170 in forum Security
    Replies: 1
    Last Post: 07-15-2009, 01:45 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