N
Niklas Östergren
Hi!
I have 2 Q!
********
Q No 1.
********
How do I make a lables visible propertie True/False if a control have value
or not?
I´m using wrong syntax here since the code below doesn´t work:
============================================
Private Sub Detalj_Format(Cancel As Integer, FormatCount As Integer)
' Make lines and lables visible = False if no control have value.
If Me.txtEmailAddress = "" And Me.txtPrivateEmailAddress = "" Then
DetailLineNo01.Visible = False
End If
If Me.txtEmailAddress = "" Then
lblEmailAddress.Visible = False
End If
End Sub
********
Q No 2.
********
One control in the report (txtPrivateEmailAddress) show´s Yes/No for a
boolean field in a query. If I display records which dont have anything in
this field (it´s not even created in the table) then I don´t want to show
the lable for this control (lblPrivateEmailAddress)..
The problem I have right now is that if this control isn´t created it
display´s <No> in txtPrivateEmailAddress which is NOT what I want?
The reason to why control txtPrivateEmailAddress don´t have anyting is due
to the table design is one to many relational, like this:
tblPerson........................tblPersonEmailAddress
PersonId (One)----(Many) fkPersonID
The report is populated from a query which I create from a QBF and sometimes
the user don´t selects records which don´t have any related data in
tblPersonEmailAddress. THATS what I mean with that PrivateEmailAddress
doesn´t have anything.
The code I use to try this (but which doesn´t work) is:
======================================
If IsNull(Me.txtPrivateEmailAddress) Then
lblPrivateEmailAddress.Visible = False
End If
======================================
TIA!
// Niklas
I have 2 Q!
********
Q No 1.
********
How do I make a lables visible propertie True/False if a control have value
or not?
I´m using wrong syntax here since the code below doesn´t work:
============================================
Private Sub Detalj_Format(Cancel As Integer, FormatCount As Integer)
' Make lines and lables visible = False if no control have value.
If Me.txtEmailAddress = "" And Me.txtPrivateEmailAddress = "" Then
DetailLineNo01.Visible = False
End If
If Me.txtEmailAddress = "" Then
lblEmailAddress.Visible = False
End If
End Sub
********
Q No 2.
********
One control in the report (txtPrivateEmailAddress) show´s Yes/No for a
boolean field in a query. If I display records which dont have anything in
this field (it´s not even created in the table) then I don´t want to show
the lable for this control (lblPrivateEmailAddress)..
The problem I have right now is that if this control isn´t created it
display´s <No> in txtPrivateEmailAddress which is NOT what I want?
The reason to why control txtPrivateEmailAddress don´t have anyting is due
to the table design is one to many relational, like this:
tblPerson........................tblPersonEmailAddress
PersonId (One)----(Many) fkPersonID
The report is populated from a query which I create from a QBF and sometimes
the user don´t selects records which don´t have any related data in
tblPersonEmailAddress. THATS what I mean with that PrivateEmailAddress
doesn´t have anything.
The code I use to try this (but which doesn´t work) is:
======================================
If IsNull(Me.txtPrivateEmailAddress) Then
lblPrivateEmailAddress.Visible = False
End If
======================================
TIA!
// Niklas