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  

Default combo box with multiple columns



 
 
Thread Tools Display Modes
  #1  
Old February 22nd, 2007, 07:43 PM posted to microsoft.public.access.forms
Crossh
external usenet poster
 
Posts: 26
Default Default combo box with multiple columns

I have a combo box with multiple columns that I want to set to a default
selection, based on another selection from a combo box on the same form. I
tried setting the value of the combo box in the AfterUpdate event of the
first combo box, but nothing is happening to the control. Any ideas?
  #2  
Old February 23rd, 2007, 04:39 PM posted to microsoft.public.access.forms
Carl Rapson
external usenet poster
 
Posts: 517
Default Default combo box with multiple columns

Is the value you are attempting to set the second combo box to contained in
the bound column? You can only set a combo box value to what's contained in
the bound column.

Carl Rapson

"Crossh" wrote in message
...
I have a combo box with multiple columns that I want to set to a default
selection, based on another selection from a combo box on the same form. I
tried setting the value of the combo box in the AfterUpdate event of the
first combo box, but nothing is happening to the control. Any ideas?



  #3  
Old February 23rd, 2007, 04:49 PM posted to microsoft.public.access.forms
Crossh
external usenet poster
 
Posts: 26
Default Default combo box with multiple columns

Yes, but the Rowsource is a query using multiple tables.

"Carl Rapson" wrote:

Is the value you are attempting to set the second combo box to contained in
the bound column? You can only set a combo box value to what's contained in
the bound column.

Carl Rapson

"Crossh" wrote in message
...
I have a combo box with multiple columns that I want to set to a default
selection, based on another selection from a combo box on the same form. I
tried setting the value of the combo box in the AfterUpdate event of the
first combo box, but nothing is happening to the control. Any ideas?




  #4  
Old February 23rd, 2007, 08:37 PM posted to microsoft.public.access.forms
Ron2006
external usenet poster
 
Posts: 936
Default Default combo box with multiple columns

What code are you using? The problem could be in the code.

What are the fields in your query for the combo And are you really
trying to set the value or are you trying to set the criteria? If it
is already in the first combo, why is it the value in the second comb?

We need more information to try to determine what you are doing vs.
what you want to do.

Ron

  #5  
Old February 23rd, 2007, 09:15 PM posted to microsoft.public.access.forms
Crossh
external usenet poster
 
Posts: 26
Default Default combo box with multiple columns

Sorry for the confusion. I got it to work by putting another button on the
form. I used the same exact code, except the rowsource for the combobox (I
wanted to set the default for) was being set based on the selection from the
first combobox. I think it may have something to do with trying to do it in
an AfterUpdate event rather than OnClick, although it worked ok for a
textbox. Thanks for all you help, anyway.

"Ron2006" wrote:

What code are you using? The problem could be in the code.

What are the fields in your query for the combo And are you really
trying to set the value or are you trying to set the criteria? If it
is already in the first combo, why is it the value in the second comb?

We need more information to try to determine what you are doing vs.
what you want to do.

Ron


 




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 02:03 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.