Thanks Thanks:  0
Likes Likes:  0
Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16

Thread: VBA code

  1. #11
    New Member
    Join Date
    Jul 2018
    Posts
    10
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: VBA code

    Awesome! Thank you!
    My new conundrum is this - My "Find Record" button on the form is not available now -- "The command or action 'Find' isn't available now."

  2. #12
    MrExcel MVP
    Moderator
    Joe4's Avatar
    Join Date
    Aug 2002
    Posts
    45,417
    Post Thanks / Like
    Mentioned
    32 Post(s)
    Tagged
    4 Thread(s)

    Default Re: VBA code

    Yes, that code will open the Form in New Record only mode.
    If you want to open the Form so that it shows/lists all current records, but opens up to the new Record option, then try this instead:
    Code:
        DoCmd.OpenForm "FormName", acNormal, "", "", , acNormal
        DoCmd.GoToRecord , "", acNewRec
    TIPS FOR FINDING EXCEL SOLUTIONS
    1. Use the built-in Help that comes with Excel/Access
    2. Use the Search functionality on this board
    3. A lot of VBA code can be acquired by using the Macro Recorder.

    "Give a man a fish, feed him for a day. Teach a man to fish, feed him for life!"

  3. #13
    New Member
    Join Date
    Jul 2018
    Posts
    10
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: VBA code

    Wow! This is great!
    Question: Perhaps I want to change it back to "New Record only mode, but this time add a query button on the form that will give each user a report of *their own entries. I know it's possible to create that query button, but what code would I use to specify the query selection based on user login?

    Thank you for your reply!!!

  4. #14
    MrExcel MVP
    Moderator
    Joe4's Avatar
    Join Date
    Aug 2002
    Posts
    45,417
    Post Thanks / Like
    Mentioned
    32 Post(s)
    Tagged
    4 Thread(s)

    Default Re: VBA code

    what code would I use to specify the query selection based on user login?
    Take a look here: http://www.databasedev.co.uk/filter_current_user.html
    Last edited by Joe4; Jul 12th, 2018 at 03:43 PM.
    TIPS FOR FINDING EXCEL SOLUTIONS
    1. Use the built-in Help that comes with Excel/Access
    2. Use the Search functionality on this board
    3. A lot of VBA code can be acquired by using the Macro Recorder.

    "Give a man a fish, feed him for a day. Teach a man to fish, feed him for life!"

  5. #15
    New Member
    Join Date
    Jul 2018
    Posts
    10
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: VBA code

    Quote Originally Posted by Joe4 View Post
    Thank you Joe4!
    I will work on this upon my arrival tomorrow. Thank you so much for assisting me. What a tremendous help!
    Question: what source can I use to enhance my ability of implementing codes? I'm also unfamiliar with the purpose of each DataMode Argument.

  6. #16
    MrExcel MVP
    Moderator
    Joe4's Avatar
    Join Date
    Aug 2002
    Posts
    45,417
    Post Thanks / Like
    Mentioned
    32 Post(s)
    Tagged
    4 Thread(s)

    Default Re: VBA code

    Question: what source can I use to enhance my ability of implementing codes? I'm also unfamiliar with the purpose of each DataMode Argument.
    To be honest, I usually just do Google Searches (like on "Access DoCmd.OpenForm"), and check out a bunch of the articles until I found one I like.
    TIPS FOR FINDING EXCEL SOLUTIONS
    1. Use the built-in Help that comes with Excel/Access
    2. Use the Search functionality on this board
    3. A lot of VBA code can be acquired by using the Macro Recorder.

    "Give a man a fish, feed him for a day. Teach a man to fish, feed him for life!"

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •