If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Use Combo Box to select record in List Box
I have a search form that looks up customers by name and by date. I am using
List Boxes for this. The customer names are growing to a point that I would like to add a Combo Box to the search by names (sort of a quick find). I would like to click on a name in the Combo Box that would select that record in the customer name List Box (List18). I am an amateur at this. Thanks for any help. |
#2
|
|||
|
|||
Use Combo Box to select record in List Box
Ron Weaver wrote: I have a search form that looks up customers by name and by date. I am using List Boxes for this. The customer names are growing to a point that I would like to add a Combo Box to the search by names (sort of a quick find). I would like to click on a name in the Combo Box that would select that record in the customer name List Box (List18). I am an amateur at this. Thanks for any help. I think it's only point you at the record when it's match with the first char on the name. Here is some ideal how i would attach this problem I have the combo box which run the SQL to get all the names with criteria (search value = null or search value like Name. then i have a unbounce box which i let the user to enter the search value. IT's only visible when the user click on the search button. Here is how it work... First when you open the form the combo box will give you all the names becuase the search value = null. If the user want to search for a specific name then click on the search and the unbounce box popup so they can enter the search value as a string. The requery the combo box they will see only the one they're looking for. Hope i'm making some sense but i think it's only see the first character on the combo box for example CCAAAAA CBAAAAA CCCCCCC C9898999 B234567 When you're type the C without in the combo box it will point you at the first record start with the C. But if you want to get the record start with CB you can't not becuase as soon as you hit the "C" then "B" it will give you the record start with the B. That's how combo box work and once again i hope i'm giving you some ideal. GL. |
#3
|
|||
|
|||
Use Combo Box to select record in List Box
Thanks for your response. I really want to click on a name in the Combo Box
which will in turn select that record in the list box. Is this not possible? " wrote: Ron Weaver wrote: I have a search form that looks up customers by name and by date. I am using List Boxes for this. The customer names are growing to a point that I would like to add a Combo Box to the search by names (sort of a quick find). I would like to click on a name in the Combo Box that would select that record in the customer name List Box (List18). I am an amateur at this. Thanks for any help. I think it's only point you at the record when it's match with the first char on the name. Here is some ideal how i would attach this problem I have the combo box which run the SQL to get all the names with criteria (search value = null or search value like Name. then i have a unbounce box which i let the user to enter the search value. IT's only visible when the user click on the search button. Here is how it work... First when you open the form the combo box will give you all the names becuase the search value = null. If the user want to search for a specific name then click on the search and the unbounce box popup so they can enter the search value as a string. The requery the combo box they will see only the one they're looking for. Hope i'm making some sense but i think it's only see the first character on the combo box for example CCAAAAA CBAAAAA CCCCCCC C9898999 B234567 When you're type the C without in the combo box it will point you at the first record start with the C. But if you want to get the record start with CB you can't not becuase as soon as you hit the "C" then "B" it will give you the record start with the B. That's how combo box work and once again i hope i'm giving you some ideal. GL. |
#4
|
|||
|
|||
Use Combo Box to select record in List Box
Yes, it is possible. The first order of business it the row source of the
list box must be a value list. It it is currently a query, you will need to write a procedure that uses the query as a recordset so you can use the AddItem method to load the list box initially. You would use the form's Load event to do this. Then, to add the content of the combo, use its After Update event And the AddItem method to append the value to the list. Me.MyListBox.AddItem(Me.MyComboBox) "Ron Weaver" wrote: Thanks for your response. I really want to click on a name in the Combo Box which will in turn select that record in the list box. Is this not possible? " wrote: Ron Weaver wrote: I have a search form that looks up customers by name and by date. I am using List Boxes for this. The customer names are growing to a point that I would like to add a Combo Box to the search by names (sort of a quick find). I would like to click on a name in the Combo Box that would select that record in the customer name List Box (List18). I am an amateur at this. Thanks for any help. I think it's only point you at the record when it's match with the first char on the name. Here is some ideal how i would attach this problem I have the combo box which run the SQL to get all the names with criteria (search value = null or search value like Name. then i have a unbounce box which i let the user to enter the search value. IT's only visible when the user click on the search button. Here is how it work... First when you open the form the combo box will give you all the names becuase the search value = null. If the user want to search for a specific name then click on the search and the unbounce box popup so they can enter the search value as a string. The requery the combo box they will see only the one they're looking for. Hope i'm making some sense but i think it's only see the first character on the combo box for example CCAAAAA CBAAAAA CCCCCCC C9898999 B234567 When you're type the C without in the combo box it will point you at the first record start with the C. But if you want to get the record start with CB you can't not becuase as soon as you hit the "C" then "B" it will give you the record start with the B. That's how combo box work and once again i hope i'm giving you some ideal. GL. |
#5
|
|||
|
|||
Use Combo Box to select record in List Box
Thanks Klatuu, this gives me a direction.
I will see what I can do with it. "Klatuu" wrote: Yes, it is possible. The first order of business it the row source of the list box must be a value list. It it is currently a query, you will need to write a procedure that uses the query as a recordset so you can use the AddItem method to load the list box initially. You would use the form's Load event to do this. Then, to add the content of the combo, use its After Update event And the AddItem method to append the value to the list. Me.MyListBox.AddItem(Me.MyComboBox) "Ron Weaver" wrote: Thanks for your response. I really want to click on a name in the Combo Box which will in turn select that record in the list box. Is this not possible? " wrote: Ron Weaver wrote: I have a search form that looks up customers by name and by date. I am using List Boxes for this. The customer names are growing to a point that I would like to add a Combo Box to the search by names (sort of a quick find). I would like to click on a name in the Combo Box that would select that record in the customer name List Box (List18). I am an amateur at this. Thanks for any help. I think it's only point you at the record when it's match with the first char on the name. Here is some ideal how i would attach this problem I have the combo box which run the SQL to get all the names with criteria (search value = null or search value like Name. then i have a unbounce box which i let the user to enter the search value. IT's only visible when the user click on the search button. Here is how it work... First when you open the form the combo box will give you all the names becuase the search value = null. If the user want to search for a specific name then click on the search and the unbounce box popup so they can enter the search value as a string. The requery the combo box they will see only the one they're looking for. Hope i'm making some sense but i think it's only see the first character on the combo box for example CCAAAAA CBAAAAA CCCCCCC C9898999 B234567 When you're type the C without in the combo box it will point you at the first record start with the C. But if you want to get the record start with CB you can't not becuase as soon as you hit the "C" then "B" it will give you the record start with the B. That's how combo box work and once again i hope i'm giving you some ideal. GL. |
#6
|
|||
|
|||
Use Combo Box to select record in List Box
This List Box is populated by a Customer Query. New customers are added daily
so I have to keep this Row Source Type. I don't have a clue about writing a procedure that uses the query as a recordset. I may be asking too much, but I sure would like some help with this. Thanks for your help. "Klatuu" wrote: Yes, it is possible. The first order of business it the row source of the list box must be a value list. It it is currently a query, you will need to write a procedure that uses the query as a recordset so you can use the AddItem method to load the list box initially. You would use the form's Load event to do this. Then, to add the content of the combo, use its After Update event And the AddItem method to append the value to the list. Me.MyListBox.AddItem(Me.MyComboBox) "Ron Weaver" wrote: Thanks for your response. I really want to click on a name in the Combo Box which will in turn select that record in the list box. Is this not possible? " wrote: Ron Weaver wrote: I have a search form that looks up customers by name and by date. I am using List Boxes for this. The customer names are growing to a point that I would like to add a Combo Box to the search by names (sort of a quick find). I would like to click on a name in the Combo Box that would select that record in the customer name List Box (List18). I am an amateur at this. Thanks for any help. I think it's only point you at the record when it's match with the first char on the name. Here is some ideal how i would attach this problem I have the combo box which run the SQL to get all the names with criteria (search value = null or search value like Name. then i have a unbounce box which i let the user to enter the search value. IT's only visible when the user click on the search button. Here is how it work... First when you open the form the combo box will give you all the names becuase the search value = null. If the user want to search for a specific name then click on the search and the unbounce box popup so they can enter the search value as a string. The requery the combo box they will see only the one they're looking for. Hope i'm making some sense but i think it's only see the first character on the combo box for example CCAAAAA CBAAAAA CCCCCCC C9898999 B234567 When you're type the C without in the combo box it will point you at the first record start with the C. But if you want to get the record start with CB you can't not becuase as soon as you hit the "C" then "B" it will give you the record start with the B. That's how combo box work and once again i hope i'm giving you some ideal. GL. |
#7
|
|||
|
|||
Use Combo Box to select record in List Box
Well, I finally worked this out. I thought someone out there might interested.
This the code for the combo box After Update event: ' Find the record that matches the control. Me.RecordsetClone.FindFirst "[CustomerID] = """ & Me![MyComboBox] & """" Me.Bookmark = Me.RecordsetClone.Bookmark Me.MyListBox.Requery Note: My customerID is Text. Used a SELECT Query for the Combo Box and the List Box. Thanks everyone. "Ron Weaver" wrote: This List Box is populated by a Customer Query. New customers are added daily so I have to keep this Row Source Type. I don't have a clue about writing a procedure that uses the query as a recordset. I may be asking too much, but I sure would like some help with this. Thanks for your help. "Klatuu" wrote: Yes, it is possible. The first order of business it the row source of the list box must be a value list. It it is currently a query, you will need to write a procedure that uses the query as a recordset so you can use the AddItem method to load the list box initially. You would use the form's Load event to do this. Then, to add the content of the combo, use its After Update event And the AddItem method to append the value to the list. Me.MyListBox.AddItem(Me.MyComboBox) "Ron Weaver" wrote: Thanks for your response. I really want to click on a name in the Combo Box which will in turn select that record in the list box. Is this not possible? " wrote: Ron Weaver wrote: I have a search form that looks up customers by name and by date. I am using List Boxes for this. The customer names are growing to a point that I would like to add a Combo Box to the search by names (sort of a quick find). I would like to click on a name in the Combo Box that would select that record in the customer name List Box (List18). I am an amateur at this. Thanks for any help. I think it's only point you at the record when it's match with the first char on the name. Here is some ideal how i would attach this problem I have the combo box which run the SQL to get all the names with criteria (search value = null or search value like Name. then i have a unbounce box which i let the user to enter the search value. IT's only visible when the user click on the search button. Here is how it work... First when you open the form the combo box will give you all the names becuase the search value = null. If the user want to search for a specific name then click on the search and the unbounce box popup so they can enter the search value as a string. The requery the combo box they will see only the one they're looking for. Hope i'm making some sense but i think it's only see the first character on the combo box for example CCAAAAA CBAAAAA CCCCCCC C9898999 B234567 When you're type the C without in the combo box it will point you at the first record start with the C. But if you want to get the record start with CB you can't not becuase as soon as you hit the "C" then "B" it will give you the record start with the B. That's how combo box work and once again i hope i'm giving you some ideal. GL. |
Thread Tools | |
Display Modes | |
|
|