Combo box conumdrum

elgoober

Registered User.
Local time
Today, 15:15
Joined
Mar 2, 2001
Messages
83
Hi

I have a Returns module that allows Companies to trace what has been received, when and why.

The Why is based on a number of reasons in a combo box linked to a table.

However, I would like to say that if a product returned was new - then the choice in the combo box was limited from say 16 reasons down to 8 - and if the item was used - the other 8 would come into play.

Cannot see a way round this, other than having 2 combo boxes - but would welcome any feedback, suggestions etc

Thanks

Paul
 
Write 2 queries as RowSource for the combo box.
After user indicates "new" or "Old" set combobox.rowsource = appropriate query
 
Additional Combo

Hi Gail

Many thanks for the reply!

Just to clarify, I assume you can't put both the queries in the row source - as I tried this to no effect - I'm being thick here - which is not a surprise - but I tried 1 query - with the criteria line set to where condition = new and the other non linked query set to where condition = used, but the query does'nt like that.

Any light shed on this most appreciated, as clearly the brain training regime set by Mr Nintendo isn't having the desired effect!

Thanks again

Paul
 
elgoober said:
Hi Gail

Many thanks for the reply!

Just to clarify, I assume you can't put both the queries in the row source - as I tried this to no effect - I'm being thick here - which is not a surprise - but I tried 1 query - with the criteria line set to where condition = new and the other non linked query set to where condition = used, but the query does'nt like that.

Any light shed on this most appreciated, as clearly the brain training regime set by Mr Nintendo isn't having the desired effect!

Thanks again

Paul

Hey Paul,

I think what Gail is saying that you will need to put some kind of a control, like an option group, to indicate whether it's "New" or "Used", then in that option groups AfterUpdate event you put code in that changes the RowSource of the cboBox based on the choice in the option group.
 
Leave the rowSource blank in the properties sheet.
In the AfterUpdate event of the "New/Old" control write something like this:
If new/old = New then
Forms!<ParentFormName!<subformName>.Form! <comboBoxName>.RowSource = "<queryName for list of New>"
Else
Forms!<ParentFormName!<subformName>.Form! <comboBoxName>.RowSource = "<queryName for list of Old>"
end if
 
GailFialho said:
Leave the rowSource blank in the properties sheet.
In the AfterUpdate event of the "New/Old" control write something like this:
If new/old = New then
Forms!<ParentFormName!<subformName>.Form! <comboBoxName>.RowSource = "<queryName for list of New>"
Else
Forms!<ParentFormName!<subformName>.Form! <comboBoxName>.RowSource = "<queryName for list of Old>"
end if

Sorry Gail, didn't mean to step on your post. I thought you had left for the day so I was just trying to lend a hand.

Shane
 
No one knows everything.
ALL contributions are welcome.
ElGoober and I need all the help we can get!
 
Salute

Gail and Shane

To my Nights and Nightesses in armour of shimmering....

For your time - (and patience)

Thanks

Paul
 

Users who are viewing this thread

Back
Top Bottom