Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

dropdown box (not) visible 1

Status
Not open for further replies.

matrixindicator

IS-IT--Management
Sep 6, 2007
418
BE
Hello,

I have a drop down box in a order subform.
The user select an article with a combobox.
The values of this combobox is a article list.
In this articles list we have a field "pie".

Eg
Code:
ARTICLE     | PIE
chocolate   | 
pie1        | pie
pie2        | pie
pie3        | pie
chocolate   |

If there is written "pie" in the field PIE then after selection of the article in the combobox then another combobox Number of Persons should set to visible. If there is nothing available then combobox Number of Persons should be invisible.
Can you simple work with ?
Code:
if ..
cboxPersons.visible = true
else
cboxPersons.visible = false
end if
This seems not to work.



 
depends what's in your if - try
Code:
if cboxArticles.column(1)="pie"
cboxPersons.visible = true
else
cboxPersons.visible = false
end if
 
How about using something like this (assuming that your combo has two columns and you want to check against "pie" in the second column as you stated):
Code:
Private Sub YourArticleCombo_Click()
cboxPersons.Visible = YourArticleCombo.Column(1, YourArticleCombo.ListIndex) = "pie"
End Sub
Hope this helps

HarleyQuinn
---------------------------------
You can hang outside in the sun all day tossing a ball around, or you can sit at your computer and do something that matters. - Eric Cartman

Get the most out of Tek-Tips, read FAQ222-2244: How to get the best answers before posting.

 
I am trying to implement.
But I wonder, should this work for cbox for each record of the subfom

Code:
article1 cboPERS (not visible)
article2 cboPERS (not visible)
article3 cboPERS (visible)
article4 cboPERS (not visible)
article5 cboPERS (visible)
 
I'm sorry but I really don't understand what you mean by your last post?

HarleyQuinn
---------------------------------
You can hang outside in the sun all day tossing a ball around, or you can sit at your computer and do something that matters. - Eric Cartman

Get the most out of Tek-Tips, read FAQ222-2244: How to get the best answers before posting.

 
Yep dhookom, that was my fear, subform is continuous.
Is there a way to get some or another solution ?
Is this something you (I mean not you) could programme ?
 
If you use conditional formatting you can disable the second combo based on the value of the first. It is not completely invisible, but you can grey it out and change the font color and background color to look disabled.
 
Ok, MajP, I was thinking the same direction, ofcourse, you can't make it completely invisible.

Thanks to all for good feedback (please don't take it as a blame if I only reward MajP).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top