Results 1 to 2 of 2
  1. #1
    ittechguy is offline Competent Performer
    Windows 8 Access 2013
    Join Date
    Aug 2015
    Posts
    218

    Using bound combo box without changing record?

    I've got a form I'm building. its rather rough but thus far it looks like this:



    Click image for larger version. 

Name:	newequipmentform.png 
Views:	18 
Size:	33.8 KB 
ID:	22738

    I have two sets of identical boxes, "Physical location" and "Change Physical Location." One is a set of locked text boxes which displays current location, the other is a set of combo boxes used to change the CabinetPK which the equipment on the form is assigned to. The field I'm updating is tblEquipment.CabinetFK. I'm trying to combine the two sets of boxes so that there is only 3 combo boxes.

    The issue I was having with that is that Building Name and Room Name are both bound to their respective number fields in the query. However, they are used to display information and also all three boxes are cascading as to ensure you select the correct Cabinet Name. So, because they are bound to BuildingFK and RoomFK, if I select a new building, room, and cabinet it will not allow me to save the record. It tells me that would create duplicate entries in the table.

    Sooo, is there any way to get the Building Name and Room Name combo box to display the correct building/room (so that the user is not confused), but when a new value is selected from the combo box... only Cabinet Name is updated? I'm guessing I have to us VBA code to unbound the cbo boxes and then bind them again after the update has been made?

  2. #2
    Gina Maylone is offline Always learning
    Windows 7 64bit Access 2013
    Join Date
    Jun 2013
    Location
    Afton, MN
    Posts
    544
    Hi!

    You could use an unbound text box or boxes with a dlookup function. dlookup("buildingname","yourtablename","yourcriter ia") and do the same for room number, then create another text box and in the control source put "me.textbox1&" "&me.textbox2". Which will combine the values of the two lookup text boxes.

    HTH
    Gina

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

Similar Threads

  1. Replies: 6
    Last Post: 01-30-2014, 05:57 PM
  2. Text box bound to combo box
    By Tari in forum Forms
    Replies: 4
    Last Post: 01-11-2012, 02:19 PM
  3. Replies: 7
    Last Post: 10-03-2011, 12:44 PM
  4. Combo Box non bound output to table
    By burnsey in forum Forms
    Replies: 3
    Last Post: 04-26-2011, 07:29 AM
  5. Replies: 10
    Last Post: 08-01-2009, 06:48 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