473,499 Members | 1,660 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Another control value as a Default value

41 New Member
Hi,

How to get another Control value as a Default value of other control?

For example, Whatever the value entered in Text1, need to come in Text 2 also. If require, the user can change the value in text2.

Can anybody please suggest me..?

Thanks in advance..

ngr.
Apr 14 '07 #1
3 2622
Rabbit
12,516 Recognized Expert Moderator MVP
Either set the control source to the textbox or do it through the after update event.
Apr 14 '07 #2
solargovind
41 New Member
Either set the control source to the textbox or do it through the after update event.
==============

I am not aware how to set control source. And, In the textbox after update event, i apply the below code which shows the below Error

"You can't reference a property or method for a control unless the control has the focus".

The code is..

Text1_Afterupdate()
text2.text=text1.text [ or ]
combo2.value=combo1.value
End sub

Can u pls.point out me how could i do this..?

Earliest reply would be appreciated.

Thanks in advance.

ngr.
Apr 16 '07 #3
Rabbit
12,516 Recognized Expert Moderator MVP
==============

I am not aware how to set control source. And, In the textbox after update event, i apply the below code which shows the below Error

"You can't reference a property or method for a control unless the control has the focus".

The code is..

Text1_Afterupdate()
text2.text=text1.text [ or ]
combo2.value=combo1.value
End sub

Can u pls.point out me how could i do this..?

Earliest reply would be appreciated.

Thanks in advance.

ngr.
Well, most likely you won't be setting the control source because that takes away its ability to save to a table.

You don't need the .text property. and I don't know what the [or] is about but that shouldn't be there. You don't need the .value property either.
Apr 16 '07 #4

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

Similar topics

3
2727
by: windandwaves | last post by:
Hi Gurus Does anyone know how I set the error trapping to option 2 in visual basic. I know that you can go to tools, options and then choose on unhandled errors only, but is there a VB command...
4
3423
by: MLH | last post by:
From FormA or from the immediate window, what can I run to determine if a specified control (say, "MyComboBox") exists on FormB (or ReportB)? We could narrow it down, specifying that FormB (or...
26
21277
by: Paul | last post by:
public class A { public A () { // here I would like to call the second version of _ctor, how to accomplish this ? } public A (int a, int b, int c) {
4
1567
by: aschmidt | last post by:
Another bug in smart navigation. If smartnavigation is enabled in the page and session timeout occurs, the framework redirects you to wrong location of login.aspx page if you use Forms...
5
2433
by: Mrozu | last post by:
Hi I have frm1. On this form button.Click code for this button is: Dim frm2 as New frm2 frm2.show So after click, frm2 form is shown.
7
6088
by: JJ | last post by:
How do I set one field to have the updated timestamp, and another to have the created timestamp? I want to do this directly from code generated from DB Designer if possible?! JJ
8
2015
by: Geoff Cox | last post by:
Hello, When using Internet Explorer, on networked PCs in a college, to view a page of mine with Javascript code in it the "stack overflow" error message appears. When I access the same file...
1
1735
by: MLH | last post by:
I have a form used as a subform on frmCreateInvoice. It is displayed in datasheet view in the subform control. It displays a few text fields, a boolean field (shown as a checkbox control) and a...
12
2340
by: Rob | last post by:
Let's say you open Form1 that contains TabControl1 There are several tabs on TabControl1 Now you open a new Form2 that contains a User Control How can you determine the Selected tab in Form1...
0
7134
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7014
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...
0
7180
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6905
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...
0
5485
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,...
1
4921
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4609
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1429
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 ...
0
311
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.