| | |
Textboxes
Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Aug 2008
Posts: 9
Reputation:
Solved Threads: 0
Hey there,
I have the following problem driving me nuts!
I have 2 check boxes and each one is assigned a message (for check 1 say Hi, for check 2 say food). If I click on one of them, it displays its message in a text box, and pressing the second one, (with the 1st one still ticked) should display both messages. Problem is, one is overwriting the other, and vice-versa. Any tips?
I have the following problem driving me nuts!
I have 2 check boxes and each one is assigned a message (for check 1 say Hi, for check 2 say food). If I click on one of them, it displays its message in a text box, and pressing the second one, (with the 1st one still ticked) should display both messages. Problem is, one is overwriting the other, and vice-versa. Any tips?
Hi,
You need to build the message string accordingly..
Try This :
Regards
Veena
You need to build the message string accordingly..
Try This :
vb Syntax (Toggle Plain Text)
Dim T As String T= "" If chk1.Value = vbChecked Then T = "Hi " End If If chk2.Value = vbChecked Then T = T & " Food " End If MsgBox T
Regards
Veena
•
•
Join Date: Aug 2008
Posts: 9
Reputation:
Solved Threads: 0
•
•
•
•
Hi,
You need to build the message string accordingly..
Try This :
vb Syntax (Toggle Plain Text)
Dim T As String T= "" If chk1.Value = vbChecked Then T = "Hi " End If If chk2.Value = vbChecked Then T = T & " Food " End If MsgBox T
Regards
Veena
That was a real life saver!
In fact the error I made was using T = T And " Food " instead of T = T & " Food "
Thanks for the tip !
Cheers
![]() |
Similar Threads
- MultiLine TextBoxes in GridView edit mode (ASP.NET)
- C# TextBoxes (ASP.NET)
- How to databind to textboxes (ASP.NET)
- Browser not displaying Textboxes!! (ASP.NET)
- Ref. 20 textboxes on a form numerically (VB.NET)
- Validate textboxes (HTML and CSS)
- dynamically generated textboxes & radio buttons php, insert into db (PHP)
- Data Navigation in textboxes with ADO.NET (like ADO) (ASP.NET)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: Bar code scanner
- Next Thread: how to display a picture from "C:\" in picturebox1
Views: 600 | Replies: 3
| Thread Tools | Search this Thread |
Tag cloud for Visual Basic 4 / 5 / 6
* 6 2007 access activex add age append application basic beginner birth bmp c++ calculator cd cells.find click client code college column component connection connectionproblemusingvb6usingoledb copy creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit error excel excelmacro file filename form hardware header iamthwee image inboxinvb internetfiledownload keypress label listview liveperson login looping machine microsoft movingranges number objectinsert open oracle password prime program prompt range-objects readfile reading record refresh remotesqlserverdatabase report retrieve save search sendbyte sites sort sql sql2008 sqlserver struct subroutine table tags textbox time timer urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows





