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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Controls visibility based off another BUT on Continuous Form

Status
Not open for further replies.

oxicottin

Programmer
Jun 20, 2008
353
US
Hello, I have a form that is a continuous form and it has a combo box named [cboProductID] that If I select ID 10 or 21 then I need to show a text box in that row named [txtGap]. The problem I’m having is since it’s a continuous form the first time I select 10 or 21 all the txtGap text boxes set to visible and vise versa. My question is how do I get it to work with just that record? Below is the VBA I’m using in the [cboProductID] after update. Thanks!


Code:
If Me.cboProductID = 10 Or Me.cboProductID = 21 Then
Me.txtGap.Visible = True
Else
Me.txtGap.Visible = False
End If

Thanks,
SoggyCashew.....
 
Duane, I'm finding this out... Bad thing is im maxed out at 3 already plus you cant change visibility only colors and Im using custom colors. Any suggestions?

Thanks,
SoggyCashew.....
 
you can conditionally enable and disable a control.
You can conditionally fake visibility by making the control background and font the same color as the form background
 
Majp, I have used my 3 conditions already though.... And how can I change the colors to my background if they are not in the color palette? I have a Detail Background thats #014051 and the textbox is background is just white with forecolor black so how would that work?

Thanks,
SoggyCashew.....
 
And how can I change the colors to my background if they are not in the color palette?
Hmmm, lets see... Pick a background and control colors that do work.
I have used my 3 conditions already though
So you are out of luck then. If you have to do this, then you will have to reconsider your design. Consider seperating "viewing" from input/edit. You could have a pop up to add/edit records and then have more control in single form view.
 
Or you could upgrade to Access 2010 which allows an amazing 50 Condition Rules per Control!

Just out of curiosity, what are the current three conditions you are using?

The Missinglinq

Richmond, Virginia

The Devil's in the Details!
 
Missinglinq, I got it to work using conditional formatting but took me a while to figure out how to get it to work the way I needed it to. As for the Access 2010 my company don't spend $.... Lol but want more and more and more... Thanks!

Thanks,
SoggyCashew.....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top