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

    How to make unbound combobox display value from table

    I'm creating a popup form which allows me to change customer information.

    Click image for larger version. 

Name:	change.png 
Views:	8 
Size:	13.8 KB 
ID:	22523



    Its a little rough now, but the one on top displays the values for the record in tblCustomer selected from another form. It uses DLookup to pull the values from separate lookup tables and it uses hidden textboxes which are bound to the FKs (OrganizationFK, ShopNameFK, OfficeSymFK, and RankFK) from tblCustomer.

    The form on the bottom is to make changes. So a user would select a value form each combobox and type in a name or whatever else needs to be changed, and hit the change button.

    How can I combine these two? I would like to have combo boxes display information, but then also be used to change information.

    I suppose I could add the lookup tables to a query for this form, but I think that would make the form un-editable, or at least not easily.

  2. #2
    ittechguy is offline Competent Performer
    Windows 8 Access 2013
    Join Date
    Aug 2015
    Posts
    218
    Nvm. I feel stupid, I really shouldn't code while tired.

    All I had to do was bind each combo box to their respective FKs and have it display the name in the second column.

  3. #3
    ittechguy is offline Competent Performer
    Windows 8 Access 2013
    Join Date
    Aug 2015
    Posts
    218
    I even figured out how to make it ask the user if they are sure they want to make changes.

    Code:
    Private Sub cmdChange_Click()    MsgBox "Are you sure you want to make changes to this customer?", vbYesNo
        If vbYes Then
                Me.Requery
        Else
                Me.Undo
        End If
    End Sub

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

Similar Threads

  1. Replies: 6
    Last Post: 03-03-2015, 08:24 PM
  2. Replies: 5
    Last Post: 01-30-2015, 02:45 PM
  3. Replies: 5
    Last Post: 02-12-2014, 11:52 PM
  4. Replies: 1
    Last Post: 04-26-2013, 05:30 PM
  5. How do you make a text box display a value from a table?
    By italianfinancier in forum Reports
    Replies: 3
    Last Post: 06-01-2011, 12:15 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
  •  
Other Forums: Microsoft Office Forums