TextBox visible only when used

Robert Saye

Registered User.
Local time
Today, 00:36
Joined
Jun 19, 2000
Messages
49
Hi all,

I have a form which has five textboxes on it (as well as other info). I have 7 different types of circuit boards I am tracking, and they each have different combinations of programmable logic devices. I have five fields in my Board table, [FPGA, GPHL, PLD1, PLD2, PLD3]. Some of the boards have only one or two of these. I would like to have the ones not being used to disappear while the user is browsing the form. So if they are looking at board type 1 which has a [FPGA, GPHL, and a PLD1] I would like textbxPLD2 and textbxPLD3 to be invisible. Any ideas?

Thanks all.
 
Do this on the Form_Current Event. Set the Fields Visible Property to False for those that don't have data.
 
Hi me again,

I tried to set them to not visible, this is the code I used. (It didn't work)


Private Sub Form_Current()
If Me.FPGACheckSum = Null Then
Me.FPGACheckSum.Visible = False
If Me.GPHLCheckSum = Null Then
Me.GPHLCheckSum.Visible = False
If Me.PLDCheckSum = Null Then
Me.PLDCheckSum.IsVisible = False
End Sub

Any ideas???
 
If IsNull(Me!YourTextBox) Then Me![Me!YourTextBox].Visible = False
ElseIf IsNull(Me!YourOtherTextBox) Then Me![Me!YourOtherTextBox].Visible = False
End If
 
It's me again,

I don't understand what I am doing wrong, once again my code isn't working. Here is the newest version:

Private Sub Form_Current()
If IsNull(Me!FPGACheckSum) Then
Me![Me!FPGACheckSum].Visible = False
ElseIf IsNull(Me!GPHLCheckSum) Then
Me![Me!GPHLCheckSum].Visible = False
ElseIf IsNull(Me!PLDCheckSum) Then
Me![Me!PLDCheckSum].Visible = False
End Sub

Any other ideas??

Thank You,
Robert
 

Users who are viewing this thread

Back
Top Bottom