Combo boxes datasheet view - change dropdown values depending on what is selected? 
Author Message
 Combo boxes datasheet view - change dropdown values depending on what is selected?

I have a CustomerOrders subform (datasheet view) in which one field needs to
change it's dropdown list depending on that which is selected by the combo
in the previous field.
This is easy to do, however the values in previous records disappear when
the new value is selected because they are not included in the new record's
combo query criteria.

Question: is it possible to do what I require in datasheet view?
Or can anyone suggest another method?

Thanks in advance for any replies

Ed the frustrated one.

-------------------------
Ed Adamthwaite
Remove "SpamMeNot" if replying by email



Fri, 19 Sep 2003 15:39:44 GMT  
 Combo boxes datasheet view - change dropdown values depending on what is selected?
I also ran into this exact same limitation.  I ended up creating a main form
that was not bound to any data source but had all of the same fields.  After
the user enters the information, he would then click on a button that saves
the record to the source table.  The sub form shows the records as they are
being entered.

As you can imagine, this solution quickly gets awkward.  Now I need to
figure out a way to edit existing records, or delete records I don't want
anymore.

If anyone has a canned solution or any easier work around I would be
extremely interested as well.


Quote:
> I have a CustomerOrders subform (datasheet view) in which one field needs
to
> change it's dropdown list depending on that which is selected by the combo
> in the previous field.
> This is easy to do, however the values in previous records disappear when
> the new value is selected because they are not included in the new
record's
> combo query criteria.

> Question: is it possible to do what I require in datasheet view?
> Or can anyone suggest another method?

> Thanks in advance for any replies

> Ed the frustrated one.

> -------------------------
> Ed Adamthwaite
> Remove "SpamMeNot" if replying by email



Fri, 19 Sep 2003 23:16:37 GMT  
 Combo boxes datasheet view - change dropdown values depending on what is selected?
Hi Ed,

I hit this same problem a few weeks ago, see the solution I posted on
my web site...

hth

http://www.geocities.com/pmpg98_pt/DependCombos.html

Pedro Gil

On Mon, 2 Apr 2001 17:39:44 +1000, "Ed Adamthwaite"

Quote:

>I have a CustomerOrders subform (datasheet view) in which one field needs to
>change it's dropdown list depending on that which is selected by the combo
>in the previous field.
>This is easy to do, however the values in previous records disappear when
>the new value is selected because they are not included in the new record's
>combo query criteria.

>Question: is it possible to do what I require in datasheet view?
>Or can anyone suggest another method?

>Thanks in advance for any replies

>Ed the frustrated one.

>-------------------------
>Ed Adamthwaite
>Remove "SpamMeNot" if replying by email

---------
Pedro Gil
http://www.geocities.com/pmpg98_pt

DDPI
http://www.users.bigpond.com/papwalker/DDPI.HTML
https://sourceforge.net/projects/ddpi/



Fri, 19 Sep 2003 23:46:48 GMT  
 Combo boxes datasheet view - change dropdown values depending on what is selected?
I don't know of a way to do this in datasheet view.  If you can use a continuous
form view that is set up to mimic the datasheet then you can put a bound text
control on top of the combobox to display the value.  In the got focus event of
the text control, you add code to force the focus from the text control to the
combobox.  I usually size the text control to cover all but the drop down
arrow(?) of the combobox.  That way, the user can see and click on the dropdown
arrow.
Quote:

> I have a CustomerOrders subform (datasheet view) in which one field needs to
> change it's dropdown list depending on that which is selected by the combo
> in the previous field.
> This is easy to do, however the values in previous records disappear when
> the new value is selected because they are not included in the new record's
> combo query criteria.

> Question: is it possible to do what I require in datasheet view?
> Or can anyone suggest another method?

> Thanks in advance for any replies

> Ed the frustrated one.

> -------------------------
> Ed Adamthwaite
> Remove "SpamMeNot" if replying by email



Fri, 19 Sep 2003 23:57:52 GMT  
 Combo boxes datasheet view - change dropdown values depending on what is selected?
Thanks all for the replies,
I have almost sorted it out. I tried Pedro's examples but find you can't go
back and change a value after moving on to a new record.
John's suggestion allows editing afterwards, but there is a problem if the
user changes the value of the first combo in a previous record and then
moves to change a value in the second combo on another record. A bit of
checking code should sort this though.
Thanks again.
Ed.

--
-------------------------
Ed Adamthwaite
Remove "SpamMeNot" if replying by email


Quote:
> I have a CustomerOrders subform (datasheet view) in which one field needs
to
> change it's dropdown list depending on that which is selected by the combo
> in the previous field.
> This is easy to do, however the values in previous records disappear when
> the new value is selected because they are not included in the new
record's
> combo query criteria.

> Question: is it possible to do what I require in datasheet view?
> Or can anyone suggest another method?

> Thanks in advance for any replies

> Ed the frustrated one.

> -------------------------
> Ed Adamthwaite
> Remove "SpamMeNot" if replying by email



Sun, 21 Sep 2003 11:18:29 GMT  
 Combo boxes datasheet view - change dropdown values depending on what is selected?
I have dealt with these kind of problems by using some tricks that seem a
little like cheating, but they work.

Try using a text box placed over the top of your drop down list.  It has
been a while since I have done this so can't remember exactly how I did it.
It seems like I used a bound text box, an unbound text box and a bound drop
down list.

The idea is that if you select a value in the drop down list it will save
the value into the field thus updating the bound text box.  When you choose
a value in the other drop down that causes the first one to requery and come
up blank the value in the text box will still be displayed and since it was
carefully placed so that it looks like part of the drop down the user has
not a clue.

That was complicated.  I hope that helps.

Randy


Quote:
> I have a CustomerOrders subform (datasheet view) in which one field needs
to
> change it's dropdown list depending on that which is selected by the combo
> in the previous field.
> This is easy to do, however the values in previous records disappear when
> the new value is selected because they are not included in the new
record's
> combo query criteria.

> Question: is it possible to do what I require in datasheet view?
> Or can anyone suggest another method?

> Thanks in advance for any replies

> Ed the frustrated one.

> -------------------------
> Ed Adamthwaite
> Remove "SpamMeNot" if replying by email



Sun, 21 Sep 2003 22:24:29 GMT  
 Combo boxes datasheet view - change dropdown values depending on what is selected?
Hi Ed,

Can you explain a little better the problem you are having with my
sample, I would like to improve it, if possible.

I was checking that out, and at least on the sample form that I've
made avaible, I'm able to insert a new record, chose whatever values
and go back to any record and change it's values.

Can you please describe what you were trying to do, and wasn't
possible, so I can improve tha sample, and maybe help you out on the
process

Pedro Gil

On Wed, 4 Apr 2001 13:18:29 +1000, "Ed Adamthwaite"

Quote:

>Thanks all for the replies,
>I have almost sorted it out. I tried Pedro's examples but find you can't go
>back and change a value after moving on to a new record.
>John's suggestion allows editing afterwards, but there is a problem if the
>user changes the value of the first combo in a previous record and then
>moves to change a value in the second combo on another record. A bit of
>checking code should sort this though.
>Thanks again.
>Ed.

>--
>-------------------------
>Ed Adamthwaite
>Remove "SpamMeNot" if replying by email

---------
Pedro Gil
http://www.geocities.com/pmpg98_pt

DDPI
http://www.users.bigpond.com/papwalker/DDPI.HTML
https://sourceforge.net/projects/ddpi/



Mon, 22 Sep 2003 17:43:39 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. load 2nd combo box - depend on first combo box

2. Default value for dropdown combo list box?

3. Loading a 2nd dropdown depending on the selection in the first dropdown

4. enter data in a combo box based on value from another combo box

5. populate textbox from external file depending on combo box selection

6. Form view / datasheet view, subform only

7. Change values of second combo box?

8. How to set default value of combo box to value of record in database

9. Change the Height of a Combo DropDown

10. 97, Combo box, Dropdown problem.

11. Combo Box won't dropdown on form open

12. how to set read only a dropdown combo box

 

 
Powered by phpBB® Forum Software