Results 1 to 14 of 14
  1. #1
    aligahk06 is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Apr 2010
    Posts
    94

    auto value update from Combox value seelction.

    I have a combo box that display three field value in three column in the combo
    it display records in
    tenantName , Level#, unitno,
    once i select tenant name from combo then corresponding field level# field value and unitno field value data would come automatic in that field.
    All are form field value.



    please assist me how to do this ?

    rgds,
    aligahk06

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2016
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,530
    Assuming you have a text box called "Level" and another called "unitno".

    Set the Control Source property of text box "Level" to =[NameOfCombo].column(1)
    Set the Control Source property of text box "unitno" to =[NameOfCombo].column(2)
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  3. #3
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Object names should be only letters and/or numbers (the underscore is the exception).

    Instead of "Level#", you should use "LevelNum".
    The "#" is a reserved word/symbol in Access - it is a Date delimiter.

  4. #4
    aligahk06 is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Apr 2010
    Posts
    94
    its works fine.
    But i encountered with one problem for eg; supposing a common name has three different records ( while selecting the first name it gives the level and unitNo but under the same common name it doesn't give the other corresponding level and unitNo.
    eg:
    YYY l/+2 201
    YYY L/0 145
    if i would select the combo YYY it display the record l/+2 and 201 but at the same time if i select YYY for L/0 ,145 it won't change the value in level and unitNo.

    Thanks everyone for precious time.

  5. #5
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2016
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,530
    How do you know what the vales are in the other columns. Are they visible when you make a selection.
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  6. #6
    aligahk06 is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Apr 2010
    Posts
    94
    yes while selection the name in combo box all the records it shows order by name. There is only one table associated with form.

  7. #7
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2016
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,530
    Quote Originally Posted by aligahk06 View Post
    its works fine.
    But i encountered with one problem for eg; supposing a common name has three different records ( while selecting the first name it gives the level and unitNo but under the same common name it doesn't give the other corresponding level and unitNo.
    eg:
    YYY l/+2 201
    YYY L/0 145
    if i would select the combo YYY it display the record l/+2 and 201 but at the same time if i select YYY for L/0 ,145 it won't change the value in level and unitNo.

    Thanks everyone for precious time.
    The two text boxes should update whenever the combo is changed and should then show the new values of the column they reference. If that is not what is happening I don't know why but if you post a copy of the db I'll gladly take a look.
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  8. #8
    aligahk06 is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Apr 2010
    Posts
    94
    1. Its only happen because of records more than >250. if record is small size then it is ok with selection.
    2. i want to add records only after clicking save records button, but it saves the record while clicking on add record embedded macro.
    3. after entring if i terminate the forms without saving then it still saves the record on table.

    attach sample .
    Please assist ?
    Attached Files Attached Files

  9. #9
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2016
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,530
    1. Its only happen because of records more than >250. if record is small size then it is ok with selection.
    1. Then how are we going to find the fault with a db that has only five records?


    2. i want to add records only after clicking save records button, but it saves the record while clicking on add record embedded macro.
    3. after entring if i terminate the forms without saving then it still saves the record on table.
    That is just the way Access works. Records are automatically saved when you move to another record.
    The only way I know to avoid that is to use an unbound form but that gives developer far more work to do.
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  10. #10
    aligahk06 is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Apr 2010
    Posts
    94
    Please see attached.
    Attached Files Attached Files

  11. #11
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2016
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,530
    I have looked at your latest attachment. The updating of the two text boxes after selection in the combo is working perfectly for me.
    What do I need to do to replicate your problem
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  12. #12
    aligahk06 is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Apr 2010
    Posts
    94
    can u check for tenant bloom for two different units.

  13. #13
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2016
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,530
    Quote Originally Posted by aligahk06 View Post
    can u check for tenant bloom for two different units.
    I found the error. I'm not certain of the cause but have found a solution. See file attached

    I have changed your tables so that each has PK and removed TenantName from table WorkPermit.
    Attached Files Attached Files
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  14. #14
    aligahk06 is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Apr 2010
    Posts
    94
    Quote Originally Posted by Bob Fitz View Post
    I found the error. I'm not certain of the cause but have found a solution. See file attached

    I have changed your tables so that each has PK and removed TenantName from table WorkPermit.
    Thanks ,
    *****

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

Similar Threads

  1. Auto update combobox
    By omegads in forum Access
    Replies: 21
    Last Post: 09-07-2016, 06:20 PM
  2. Another way to Auto Update of Front End
    By rankhornjp in forum Code Repository
    Replies: 23
    Last Post: 03-12-2014, 10:43 PM
  3. Auto Update Question
    By LionsCricket in forum Access
    Replies: 3
    Last Post: 04-11-2013, 03:22 PM
  4. Combox Box Help
    By BLD21 in forum Reports
    Replies: 3
    Last Post: 09-22-2011, 01:06 PM
  5. Auto Update Forms
    By Vikki in forum Forms
    Replies: 1
    Last Post: 02-09-2010, 10:51 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