A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Use Combo Box to select record in List Box



 
 
Thread Tools Display Modes
  #1  
Old December 17th, 2006, 06:41 PM posted to microsoft.public.access.forms
Ron Weaver
external usenet poster
 
Posts: 145
Default 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  
Old December 17th, 2006, 07:32 PM posted to microsoft.public.access.forms
[email protected]
external usenet poster
 
Posts: 20
Default 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  
Old December 17th, 2006, 08:46 PM posted to microsoft.public.access.forms
Ron Weaver
external usenet poster
 
Posts: 145
Default 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  
Old December 18th, 2006, 03:19 PM posted to microsoft.public.access.forms
Klatuu
external usenet poster
 
Posts: 7,074
Default 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  
Old December 18th, 2006, 05:03 PM posted to microsoft.public.access.forms
Ron Weaver
external usenet poster
 
Posts: 145
Default 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  
Old December 18th, 2006, 08:25 PM posted to microsoft.public.access.forms
Ron Weaver
external usenet poster
 
Posts: 145
Default 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  
Old December 20th, 2006, 06:26 PM posted to microsoft.public.access.forms
Ron Weaver
external usenet poster
 
Posts: 145
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 01:01 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.