Add to Expressions Together!

B

Bob V

Is it possible to have these 2 expressions added together as I cant use both
in my code separate for my report!
BoxC1.Visible = Len([tbCreditCard1] & vbNullString) > 0
BoxC1.Visible = Len([tbCashSale1] & vbNullString) < 1
Thanks for any Help.....Bob
 
T

Tom van Stiphout

I don't quite understand what you want. Perhaps you' want to put OR
between your two conditions?
BoxC1.Visible = (Len([tbCreditCard1] & vbNullString) > 0) OR
(Len([tbCashSale1] & vbNullString) < 1)

Btw, the trick with "& vbNullString" can more elegantly be implemented
with the Nz function.

-Tom.
 
B

Bob V

Thanks Tom, But the first condition is over riding the 2nd condition, If the
first Condition [lbCreditCard1]is making lbCreditCard Visible then the
second condition ([tbCashSale]does not make invisible !............Thankf
for helping.......Bob
lbCreditCard.Visible = (Len([tbCreditCard1] & vbNullString) > 0) Or
(Len([tbCashSale] & vbNullString) < 1)

Tom van Stiphout said:
I don't quite understand what you want. Perhaps you' want to put OR
between your two conditions?
BoxC1.Visible = (Len([tbCreditCard1] & vbNullString) > 0) OR
(Len([tbCashSale1] & vbNullString) < 1)

Btw, the trick with "& vbNullString" can more elegantly be implemented
with the Nz function.

-Tom.

Is it possible to have these 2 expressions added together as I cant use
both
in my code separate for my report!
BoxC1.Visible = Len([tbCreditCard1] & vbNullString) > 0
BoxC1.Visible = Len([tbCashSale1] & vbNullString) < 1
Thanks for any Help.....Bob
 
S

SteveM

If Len([tbCreditCard1] & vbNullString) > 0 Or Len([tbCashSale1] &
vbNullString) < 1 Then
BoxC1.Visible = True
Else
BoxC1.Visible = False
End If
 
B

Bob V

Brilliant Steve , thank you very much for your Help :)
Regards Bob
If Len([tbCreditCard1] & vbNullString) > 0 Or Len([tbCashSale] &
vbNullString) < 1 Then
lbCreditCard.Visible = False
Else
lbCreditCard.Visible = True
End If

SteveM said:
If Len([tbCreditCard1] & vbNullString) > 0 Or Len([tbCashSale1] &
vbNullString) < 1 Then
BoxC1.Visible = True
Else
BoxC1.Visible = False
End If
--
Steve McGuire
MCSD, MCAD, MCP


Bob V said:
Is it possible to have these 2 expressions added together as I cant use
both
in my code separate for my report!
BoxC1.Visible = Len([tbCreditCard1] & vbNullString) > 0
BoxC1.Visible = Len([tbCashSale1] & vbNullString) < 1
Thanks for any Help.....Bob
 
B

Bob V

Steve one thing it will not let me assign it to a text box with this Control
Source
=IIf(IsNull([tbDirectBank]),"",UCase(Left(DLookUp("[OwnerLastName]","tblOwnerInfo","[OwnerID]
= " & [tbOwnerID]),3)))
"you cant assign a value to this Object"
Regards Bob

SteveM said:
If Len([tbCreditCard1] & vbNullString) > 0 Or Len([tbCashSale1] &
vbNullString) < 1 Then
BoxC1.Visible = True
Else
BoxC1.Visible = False
End If
--
Steve McGuire
MCSD, MCAD, MCP


Bob V said:
Is it possible to have these 2 expressions added together as I cant use
both
in my code separate for my report!
BoxC1.Visible = Len([tbCreditCard1] & vbNullString) > 0
BoxC1.Visible = Len([tbCashSale1] & vbNullString) < 1
Thanks for any Help.....Bob
 
B

Bob V

Oops take no notice of that last post :0
Forgot to add .Visible
Sorry Bob

SteveM said:
If Len([tbCreditCard1] & vbNullString) > 0 Or Len([tbCashSale1] &
vbNullString) < 1 Then
BoxC1.Visible = True
Else
BoxC1.Visible = False
End If
--
Steve McGuire
MCSD, MCAD, MCP


Bob V said:
Is it possible to have these 2 expressions added together as I cant use
both
in my code separate for my report!
BoxC1.Visible = Len([tbCreditCard1] & vbNullString) > 0
BoxC1.Visible = Len([tbCashSale1] & vbNullString) < 1
Thanks for any Help.....Bob
 
B

Bob V

Steve, I am getting controls not to show but now when tbCashSale is blank
my control [lbCreditCard] is not becoming Visible
regards Bob

If Len([tbCreditCard1] & vbNullString) > 1 Or Len([tbCashSale] &
vbNullString) < 1 Then
lbCreditCard.Visible = False
Else
lbCreditCard.Visible = True
End If


Bob V said:
Oops take no notice of that last post :0
Forgot to add .Visible
Sorry Bob

SteveM said:
If Len([tbCreditCard1] & vbNullString) > 0 Or Len([tbCashSale1] &
vbNullString) < 1 Then
BoxC1.Visible = True
Else
BoxC1.Visible = False
End If
--
Steve McGuire
MCSD, MCAD, MCP


Bob V said:
Is it possible to have these 2 expressions added together as I cant use
both
in my code separate for my report!
BoxC1.Visible = Len([tbCreditCard1] & vbNullString) > 0
BoxC1.Visible = Len([tbCashSale1] & vbNullString) < 1
Thanks for any Help.....Bob
 
Top