Combo Box Results (1 Viewer)

NearImpossible

Registered User.
Local time
Today, 15:10
Joined
Jul 12, 2019
Messages
225
I have a ticket form created where the tech enters the callers name and phone number each in their own field. [FacilityPOC] & [POCPhoneNumber]

What I would like to do is change the name field to a combo box so they can select it to see a previous list of names and numbers to select from, or if it doesn't exist, they can just enter it.

I created query to pull the desired information and populate the combo box and have the following code in the Facility POC Combo Box After Update

Code:
    Me.[Facility POC] = [Facility POC Combo].Column(0)
    Me.[POC Phone] = [Facility POC Combo].Column(1)

so when a name is selected from the list, it is populated in the [FacilityPOC] field and their Phone Number is populated into the [POCPhoneNumber] field.

This issue I am running into is that some customers could have multiple phone numbers so the query pulls their name twice, with the associated phone number, but no matter which entry I select from the Combo Box, it always pulls the first record for that person.

Ex.

Comb Box is populated with

Bob Smith - 123-456-7890
Bob Smith - 123-987-3210
John Jones - 145-987-6523
Mary Smith - 123-456-9870

and if I select the entry of Bob Smith - 123-987-3210 from the combo box, it is populating Bob Smith in the [FacilityPOC] & 123-456-7890 in the [POCPhoneNumber] field
 

theDBguy

I’m here to help
Staff member
Local time
Today, 13:10
Joined
Oct 29, 2018
Messages
21,447
Hi. You have two options:


1. Reverse the column order, so the phone number is first, or
2. Add an ID field to your list of names and phones (make sure the ID is different for each phone number)
 

NearImpossible

Registered User.
Local time
Today, 15:10
Joined
Jul 12, 2019
Messages
225
Hi. You have two options:


1. Reverse the column order, so the phone number is first, or
2. Add an ID field to your list of names and phones (make sure the ID is different for each phone number)

Not sure why, but I didn't include the TicketID in my query, added that and all is good as the name and number are tied to the TicketID.

thanks again !!
 

theDBguy

I’m here to help
Staff member
Local time
Today, 13:10
Joined
Oct 29, 2018
Messages
21,447
Not sure why, but I didn't include the TicketID in my query, added that and all is good as the name and number are tied to the TicketID.

thanks again !!
Congratulations! Glad to hear you got it sorted out. Good luck with your project.
 

Users who are viewing this thread

Top Bottom