473,516 Members | 3,248 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to Assign two text boxes to another text box

3 New Member
I am getting month and year in two text boxes but I want to both in one text boxe. I have tried using both ways but I have faield.
Example: 012006
'MonthYear = "imonth" & "iyear"
Month3.Text = imonth & iyear

'Month3.Text = (month1.Text & Year1.Text)

Please any suggestions that would be great help.
Thanks.

--------------------------------------------------------------------------------
Jul 19 '06 #1
3 1767
RaulSerr
4 New Member
If I understand your question correctly try something like this:

Month1.text = imonth
Year1.text = iyear
Month3.text = (month1.text & Year1.text)
Jul 19 '06 #2
sashi
1,754 Recognized Expert Top Contributor
Hi Venu,

RaulSerr is correct.. maybe a little bit of formatting will tidy up things..

Expand|Select|Wrap|Line Numbers
  1. Month1.text = imonth
  2. Year1.text = iyear
  3. Month3.text = Trim(Month1.text) & "/" &  Trim(Year1.text)
  4.  
see below example..
Trim Trailing or Leading Blanks / Whitespace from a String

Use the Visual Basic functions LTrim, RTrim, and Trim to trim whitespace from a string.

Expand|Select|Wrap|Line Numbers
  1. MyString = "   Some Text   "
  2.  
  3. Print LTrim(MyString)     ' prints "Some Text   "
  4. Print RTrim(MyString)     ' prints "   Some Text"
  5. Print Trim(MyString)     ' prints "Some Text"
  6.  
Jul 19 '06 #3
Venu gopal
3 New Member
Thanks very much Raulserr and Sashi its working fine.
Jul 20 '06 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

7
21920
by: Paul via AccessMonster.com | last post by:
I have a report with some Unbound text boxes. I want to shows the values in these text boxes from my VBA code. How can I assign the valuse thru code ? Pls help me. -- Message posted via http://www.accessmonster.com
2
15697
by: dskillingstad | last post by:
I'm trying to assign a custom value to a textbox. Here's what I have. I've created a module and "default value" code for a textbox which generates a custom auto-number (yyyy-0000) when a New Record button is clicked. The code checks the table for the highest value and then assigns 1 and inserts the value. I have a second text box which...
14
4648
by: simonmarkjones | last post by:
Hi, I'm having a bit of trouble editing an old database that was created quite a while ago by someone else. There is a form that lets the user select a member of staff and show details about the training they have had. What im trying to add to this is an email button which emails the person selected - i've managed to be able to do grab...
0
812
by: agelx | last post by:
I have an aspx page with some text boxes that run at the server. How can I assign voice recognized through QA's and Semantic items to the text boxes?
6
2249
by: david | last post by:
I try to use "for" loop to retrieve and assign values in web form. The code is in the following. But it can not be compiled. What I want to do is: txtQ1.Text = ds.Tables("mmsSpecRecord").Rows(0)("Q1") txtQ2.Text = ds.Tables("mmsSpecRecord").Rows(0)("Q2") ..... txtQ10.Text = ds.Tables("mmsSpecRecord").Rows(0)("Q10") ------code ------- Dim...
1
1370
by: Venu gopal | last post by:
I am getting month and year in two text boxes but I want to both in one text boxe. I have tried using both ways but I have faield. Example: 012006 'MonthYear = "imonth" & "iyear" Month3.Text = imonth & iyear 'Month3.Text = (month1.Text & Year1.Text) Please any suggestions that would be great help. Thanks.
1
7478
by: vega80 | last post by:
Hi. I have a problem with assigning an onkeypress-function to dynamically created input-boxes.I want to put the content of an input-field into a tag-list when the user hits enter. This works fine the first time (when the input-field is created in a non-dynamical way). The next input-field is created dynamically by a function that is called...
6
2537
by: noe1818 via AccessMonster.com | last post by:
Just a quick question about lines: Is it possible to connect a text box (e.g. txtbx1 to txtbx2 and txtbx2 to txtbx3) with lines where txtbx1,2,&3 move up or down according to their values? Like have access find the location of each txtbx and draw a line from it to the other textbox? Thanks --
11
5141
by: jwessner | last post by:
I have a form (Form1) which contains basic Project data and a subform listing the personnel assigned to the Project as a continuous form. Selecting a person on that project and clicking on a command button will open a new form (Form2). Form2 has two subforms. Both are embedded in the main form. (Subform2 is NOT embedded in subform1.) Subform1...
0
7182
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7574
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7136
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7547
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5712
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3265
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3252
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1620
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
823
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.