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

Diplaying Controls optionally on continuous form 1

Status
Not open for further replies.

Russ1005

Programmer
Dec 13, 2004
96
US
I have a continuous form and am trying to show different controls based on the model_no of the current form. Of the 4 forms (detail records) currently on screen, 1 record has a model_no of 601 and the txtGroutSerialNo control should be visible and the txtMFGDate control should be invisible based on the code below. But the txtMFGDate control is visible on all detail records including the model_no 601 record and the txtGroutSerialNo control is invisible.

Any idea why I can't get the txtGroutSerialNo control to display when model_no is in the 600 range?

Here is the On Current event code:

Private Sub Form_Current()
If Not IsNull([edge_model_no]) Then
If CInt([model_no]) >= 600 And CInt([model_no]) < 700 Then
txtMFGDate.Visible = False
txtGroutSerialNo.Visible = True
Else
txtGroutSerialNo.Visible = False
txtMFGDate.Visible = True
End If
End If

End Sub

Thanks in advance for your help,

-Russ
 
You can't do this on continuous forms.

Greg
"Personally, I am always ready to learn, although I do not always like being taught." - Winston Churchill
 
Have you tried Conditional formatting ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
I tried conditional formatting but it gives me an error saying you can't disable a control while it has focus. Con't you have to have focus in the control you are setting the conditional formatting for?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top