Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access thread: Combo box problem


Message #1 by richard@n... on Fri, 20 Jul 2001 11:38:26 +0100
Hi,



I've just started using Access - it's a great tool but I have this really 

frustrating problem with a combo box in a form...



The combo box uses a query to get a list of names. When a name is selected 

the combo box onupdate event filters the records shown in the rest of the 

form. The data for the rest of the form comes from a table which is linked 

to the names table. (Yeah, it's almost straight out of the Microsoft book 

of worked examples!!) The problem is that when the form first opens and you 

select a name , a record is immediately added for that name. After this you 

can select any name and a record is not added(unless you then use the 

record selector bar) , so, how do I stop this. Any suggestions welcome! 

I've hours trying to get this sorted!



TIA,



Richard Lewis



Message #2 by "Peter Kaufman" <kaufman@l...> on Fri, 20 Jul 2001 19:37:49 +0700
I don't think you can do this with the cbo bound to a field. I normally put

a search cbo on the top of the form in a distinctive color and use that for

the filter. It has the same recordsource but is not bound to a field. Then

there would be a similiar, but bound cbo, on the main body of the form also.



HTH,



Peter



> -----Original Message-----

> From: Richard [mailto:richard@n...]

> Sent: Friday, July 20, 2001 5:38 PM

> To: Access

> Subject: [access] Combo box problem

>

>

> Hi,

>

> I've just started using Access - it's a great tool but I have this really

> frustrating problem with a combo box in a form...

>

> The combo box uses a query to get a list of names. When a name is

> selected

> the combo box onupdate event filters the records shown in the rest of the

> form. The data for the rest of the form comes from a table which

> is linked

> to the names table. (Yeah, it's almost straight out of the Microsoft book

> of worked examples!!) The problem is that when the form first

> opens and you

> select a name , a record is immediately added for that name.

> After this you

> can select any name and a record is not added(unless you then use the

> record selector bar) , so, how do I stop this. Any suggestions welcome!

> I've hours trying to get this sorted!

>

> TIA,

>

>



Message #3 by "Richard Lobel" <richard@a...> on Fri, 20 Jul 2001 07:01:41 -0700
Richard.

I agree with Peter. Combo boxes which are going to be used to filter for

records should be made as unbound. Then you can attach a macro or VBA

code to the OnUpdate event which will read the item in the ComboBox and

filter accordingly.

Richard Lobel






  Return to Index