concatenation with < character
concatenation with < character
concatenation with < character
concatenation with < character
concatenation with < character
concatenation with < character concatenation with < character concatenation with < character concatenation with < character concatenation with < character concatenation with < character concatenation with < character concatenation with < character
concatenation with < character concatenation with < character
concatenation with < character
Go Back  Xtreme Visual Basic Talk > > > concatenation with < character


Reply
 
Thread Tools Display Modes
  #1  
Old 06-08-2017, 09:03 AM
starmanMike starmanMike is offline
Junior Contributor
 
Join Date: Oct 2005
Location: near Norwich, UK
Posts: 287
Default concatenation with < character


Hi,
I have a text box and a check box (among others). If the check box is ticked, whatever is in the text box is preceded by a 'less than' sign as follows:
Code:
if frmentry.chkfainterthan.value=true then
fmag = "<" & frmentry.txtmag.text
else
fmag = frmentry.txtmag.text
end if
But if I (say) enter 14.5 in the text box and tick the checkbox, the value of fmag remains as 14.5, not <14.5! Thinking this may have something to do with the use of < in comparisons, I used chr(60) but still no joy.
Does the value of the check box have to be declared as boolean, or is that implicit in the control itself? That's the only thing I can think of.
The routine above is in a module.

Last edited by starmanMike; 06-08-2017 at 09:04 AM. Reason: need to add info
Reply With Quote
  #2  
Old 06-08-2017, 09:25 AM
Daigon Ali Daigon Ali is offline
Regular
 
Join Date: Aug 2014
Location: London
Posts: 59
Default

Hi

The checkbox value is an integer,1= checked, 0 = unchecked. I think you need to assess the state of the checkbox by using vbChecked rather than True.

Code:
if frmentry.chkfainterthan.value=vbChecked then
fmag = "<" & frmentry.txtmag.text
else
fmag = frmentry.txtmag.text
end if
Reply With Quote
  #3  
Old 06-09-2017, 04:12 AM
starmanMike starmanMike is offline
Junior Contributor
 
Join Date: Oct 2005
Location: near Norwich, UK
Posts: 287
Default

Wow! That did it. Respect!! Thanks ever so much.
Reply With Quote
Reply

Tags
box, check, fmag, sign, text, character, concatenation


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
concatenation with &lt; character
concatenation with &lt; character
concatenation with &lt; character concatenation with &lt; character
concatenation with &lt; character
concatenation with &lt; character
concatenation with &lt; character concatenation with &lt; character concatenation with &lt; character concatenation with &lt; character concatenation with &lt; character concatenation with &lt; character concatenation with &lt; character
concatenation with &lt; character
concatenation with &lt; character
 
concatenation with &lt; character
concatenation with &lt; character
 
-->