PC Review


Reply
Thread Tools Rate Thread

Add to Expressions Together!

 
 
Bob V
Guest
Posts: n/a
 
      3rd Nov 2007


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


 
Reply With Quote
 
 
 
 
Tom van Stiphout
Guest
Posts: n/a
 
      3rd Nov 2007
On Sat, 3 Nov 2007 17:36:22 +1300, "Bob V" <(E-Mail Removed)> wrote:

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
>

 
Reply With Quote
 
Bob V
Guest
Posts: n/a
 
      3rd Nov 2007
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> On Sat, 3 Nov 2007 17:36:22 +1300, "Bob V" <(E-Mail Removed)> wrote:
>
> 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
>>



 
Reply With Quote
 
=?Utf-8?B?U3RldmVN?=
Guest
Posts: n/a
 
      3rd Nov 2007
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" wrote:

>
>
> 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
>
>
>

 
Reply With Quote
 
Bob V
Guest
Posts: n/a
 
      3rd Nov 2007
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" <(E-Mail Removed)> wrote in message
news:3B4C7C50-371C-4CBB-823D-(E-Mail Removed)...
> 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" wrote:
>
>>
>>
>> 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
>>
>>
>>



 
Reply With Quote
 
Bob V
Guest
Posts: n/a
 
      3rd Nov 2007
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" <(E-Mail Removed)> wrote in message
news:3B4C7C50-371C-4CBB-823D-(E-Mail Removed)...
> 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" wrote:
>
>>
>>
>> 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
>>
>>
>>



 
Reply With Quote
 
Bob V
Guest
Posts: n/a
 
      3rd Nov 2007
Oops take no notice of that last post :0
Forgot to add .Visible
Sorry Bob

"SteveM" <(E-Mail Removed)> wrote in message
news:3B4C7C50-371C-4CBB-823D-(E-Mail Removed)...
> 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" wrote:
>
>>
>>
>> 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
>>
>>
>>



 
Reply With Quote
 
Bob V
Guest
Posts: n/a
 
      3rd Nov 2007
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Oops take no notice of that last post :0
> Forgot to add .Visible
> Sorry Bob
>
> "SteveM" <(E-Mail Removed)> wrote in message
> news:3B4C7C50-371C-4CBB-823D-(E-Mail Removed)...
>> 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" wrote:
>>
>>>
>>>
>>> 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
>>>
>>>
>>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Function isn't available in expressions in query expressions - hel =?Utf-8?B?SWNtZWxlcg==?= Microsoft Access 3 30th Jan 2008 09:33 PM
Is this possible with Reg Expressions? Kyle Microsoft VB .NET 4 20th Jan 2007 07:49 PM
Re: Expressions Con Giacomini Microsoft Access Forms 1 11th Sep 2003 06:23 PM
Add custom regular expressions to the validation list of available expressions Jay Douglas Microsoft Dot NET Framework 0 16th Aug 2003 12:25 AM
Add custom regular expressions to the validation list of available expressions Jay Douglas Microsoft ASP .NET 0 15th Aug 2003 11:19 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:41 PM.