Results 1 to 8 of 8

Code For Command Buttons to Add Customers, Part Numbers, Descriptions

  1. #1
    billgyrotech1 is offline Competent Performer
    Windows 10 Access 2010 64bit
    Join Date
    May 2019
    Posts
    169

    Code For Command Buttons to Add Customers, Part Numbers, Descriptions

    Hello,

    When opening the database on my Main Form there is a button for Clerk. Click to enter password "clerk". On that form there are 3 buttons to 'Add' Customers, Descriptions, and Part Numbers if they don't exist in the combo boxes.

    Is there code that will popup the forms to add new? Also after entering the new Customer for instance have that Customer available in the combo box right away so the user doesn't have to exit the form and return to have it in the list?

    Thank you very much in advance,


    Bill

    PS please ask if there are any questions.

  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
    20,135
    I can't look at the attachment right now, but the most common way of doing this isn't with a button, it's the not in list event of the combo. Searching here for "notinlist" should turn up the code that will pop open a form like you want.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    billgyrotech1 is offline Competent Performer
    Windows 10 Access 2010 64bit
    Join Date
    May 2019
    Posts
    169
    Thanks for replying. It does popup the message from the combo box I think but there isn't an option to add.

  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
    20,135
    Sounds like limit to list is yes, but there isn't code to actually handle adding a record. Code would open the form, though now that I think of it later versions had some built-in capability that I haven't used. Did you search on notinlist? Here's one thread returned:

    https://www.accessforums.net/showthread.php?t=68312
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    billgyrotech1 is offline Competent Performer
    Windows 10 Access 2010 64bit
    Join Date
    May 2019
    Posts
    169
    I gave it a look and at first it seems rather complicated for my limited abilities. I will try thank you.

  6. #6
    billgyrotech1 is offline Competent Performer
    Windows 10 Access 2010 64bit
    Join Date
    May 2019
    Posts
    169
    I found a video explaining the 'List Items Edit Form'.

    You set the form that will popup up and I set it to data entry so it allows new records.

    This method is so easy and doesn't need an additional command button.

    Thanks I am learning a great deal from users on here.

  7. #7
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    20,135
    Happy to help. I've never used that built-in feature myself. It didn't exist when I started, and there's that whole "old dog, new trick" thing.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  8. #8
    billgyrotech1 is offline Competent Performer
    Windows 10 Access 2010 64bit
    Join Date
    May 2019
    Posts
    169
    Yes I agree but we still can learn new things.

    Cheers!

    By the way here is a link to the video:

    https://www.youtube.com/watch?v=7xy29Q4-DI4

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

Similar Threads

  1. Replies: 4
    Last Post: 01-20-2017, 08:16 AM
  2. Replies: 1
    Last Post: 09-09-2014, 11:29 PM
  3. Replies: 5
    Last Post: 08-07-2012, 03:35 PM
  4. Command buttons and Code
    By Jillette in forum Forms
    Replies: 4
    Last Post: 04-25-2012, 05:06 PM
  5. how do I create custom part numbers?
    By Sinatra Fan in forum Database Design
    Replies: 1
    Last Post: 09-01-2006, 04:09 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
  •  
Tech Forums: Microsoft Office Forums