Results 1 to 7 of 7
  1. #1
    pbDudley is offline Advanced Beginner
    Windows 10 Office 365
    Join Date
    Mar 2017
    Location
    New Orleans
    Posts
    51

    Create text field where it autopopulates when a certain amount of characters meet the criteria

    Hello


    I am creating a form where users will enter data, do some updates and then save all of the new records.
    Once all of the data is entered a user will enter his username and then save the records, or save the records (I have a button for that) one of the records being the username.

    I want to know how to add this to a text field I'm thinking, where I add a text field, then would need VB on click or update that would recognize the first 2 or 3 characters of the username and populate the updated by field.

    I have an access query that can pull from our in-house directory, so I already have all of the names.

    For example, I start to type, Hen, and Henry populates, or something like that. It would be the same as how we add tags on this website, I just noticed this before I submitted this thread..

    I could do a dropdown but it's a lot of users, so I'm trying to narrow the results down by using I'm assuming some sort of LIKE VB code in a VB module.

    Thank you.

  2. #2
    xps35's Avatar
    xps35 is offline Competent Performer
    Windows 10 Office 365
    Join Date
    Jun 2022
    Location
    Schiedam, NL
    Posts
    233
    Why should the user enter his username If that is already available (Environ("username")?
    How can you be sure he selects his own username?
    Groeten,

    Peter

  3. #3
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,980
    If you use a combo, you narrow it down as you type?
    Sounds as if your form is unbound? if you are trying to save multiple records in one go?
    What is there to stop me putting your name in that control?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  4. #4
    Bulzie is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    Nov 2015
    Posts
    1,474
    Yep combo box (based off of the names table you mentioned) is way to go as Welshgasman said as it handles the searching by letter for you. Or if you need it secure and need it to record the person actually updating the record, add a login screen and tie it to AD if you can. Then once they log in you have their info to tie to the updated records.

  5. #5
    pbDudley is offline Advanced Beginner
    Windows 10 Office 365
    Join Date
    Mar 2017
    Location
    New Orleans
    Posts
    51
    There isnt anything from stopping someone from doing that. I create these access databases to set up table structures and allow users to enter the needed information then some other contractors will incorporate it into a proper database.
    I can try the combo box, but yes, if someone hit save It would be nice to have it populate with the person who is using it, but for now perhaps the combo box will work.
    And Im not sure what unbound means, Ill have to google it, let me try the combo box, thanks.

  6. #6
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,980
    Unbound means you are doing a lot of the work yourself. When bound, Access saves the data automatically when you move to another record, be it a new or existing one. So the records will get saved as you go to the next one. You said in first post 'enter all records, then save them', which leads me to believe the form would need to be unbound, but if you do not know what unbound is, that cannot be the case.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  7. #7
    pbDudley is offline Advanced Beginner
    Windows 10 Office 365
    Join Date
    Mar 2017
    Location
    New Orleans
    Posts
    51
    Its not entering all of the records, its only filling in some new records, the majority of the records are being pulled from our oracle tables.
    The combo box worked for me, thanks

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

Similar Threads

  1. create google meet meeting
    By diegomarino in forum Access
    Replies: 3
    Last Post: 04-02-2024, 04:35 AM
  2. Replies: 5
    Last Post: 08-26-2015, 05:52 PM
  3. Replies: 18
    Last Post: 03-26-2015, 07:26 AM
  4. Duplicates that meet other criteria
    By erikjhayes in forum Queries
    Replies: 4
    Last Post: 09-09-2014, 10:36 AM
  5. Replies: 2
    Last Post: 06-04-2013, 07:57 AM

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