Results 1 to 3 of 3
  1. #1
    rwahdan1978 is offline Advanced Beginner
    Windows 11 Access 2016
    Join Date
    Jun 2024
    Posts
    57

    get the record id after combobox selection


    Hi

    I have a textbox that has the recordID and I have a combobox that has customer name. when the form is loaded I get ID: 1 and Customer Name: Rami. If I change the
    value in the combobox and select a different name, I am still getting ID: 1, how to update that?

    Click image for larger version. 

Name:	img.jpg 
Views:	14 
Size:	33.4 KB 
ID:	52150

  2. #2
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,555
    Without telling us where each of those come from, we have no idea whatsoever.
    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

  3. #3
    Micron is online now Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,423
    Just making a selection in a bound combo does not move to a new record. What you'd actually be doing is changing the value for that field in that record. That's why having bound combos for field choices is risky if user does not know how things work. Sometimes they think that because there is a save button on the form and they didn't click it after playing with the combo values that there's not going to be a change. That may not be the case.

    Load your form, change a combo value, use your nav buttons to move off and then back onto that record. If your changed combo value is saved, your form will be susceptible to unwanted changes. Best think about whether or not you need to protect data from unwanted changes by your users if that is the case.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

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

Similar Threads

  1. Replies: 8
    Last Post: 04-30-2020, 07:59 AM
  2. How to update record with combobox selection
    By vector39 in forum Programming
    Replies: 3
    Last Post: 09-25-2017, 09:19 AM
  3. Replies: 4
    Last Post: 09-13-2017, 10:35 AM
  4. Replies: 1
    Last Post: 04-13-2016, 09:02 PM
  5. Combobox selection updates Table record
    By lucky in forum Access
    Replies: 4
    Last Post: 10-30-2011, 10:44 AM

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