Computing.Net > Forums > Programming > Display in another text box

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Display in another text box

Reply to Message Icon

Name: migs
Date: August 12, 2002 at 03:31:26 Pacific
Comment:

Hi there

I have an inquiry regarding access forms.

What code/syntax can i use to display the value that i input on one text box on form A to another text box in form b?

Thanks in advance !!! =)



Sponsored Link
Ads by Google

Response Number 1
Name: mike
Date: August 12, 2002 at 03:39:43 Pacific
Reply:

Well a simple way is to create a module.Then
declare a variable like " Public X as Y
where X is the variable name and y is its type[like integer(string in your case)].
then in form "a" you write something like x =text1.text and in form "b" text1.text=x and it is done.Where text1 is the name of the textbox,for example it could be txtf1.text or something like that.


0

Response Number 2
Name: migs
Date: August 12, 2002 at 03:46:18 Pacific
Reply:

Hi mike!

Thanks for the fast response.

The thing is, im not familiar in using modules.

what i have in mind is this:

In form A with label/text box:

labelbox.caption = (the value in textbox in form B).

thanks!! =)


0

Response Number 3
Name: Victor516
Date: August 12, 2002 at 08:08:05 Pacific
Reply:

I think you do that like this formname.textboxname.text=textboxname.text



0

Response Number 4
Name: Harris
Date: August 12, 2002 at 11:51:29 Pacific
Reply:

You can do something similar to what Victor516 said.
If in VB
TextboxnameF1=Formname.TextboxnameF2
Where TextboxnameF1 is text box on form 1 TextboxnameF2 is text box on form 2
Hope it will work


0

Response Number 5
Name: migs
Date: August 13, 2002 at 02:20:36 Pacific
Reply:

Hey, thanks for your responses.

But it still doesn't work.
(i'm using Access 2000 with VB Coding)

Here is how it goes:

Enter a value in textbox.text in form1. And that value must be shown labelbox.caption in form2.

I have already tried the following events:
- click -with a button
- change
- lostfocus

but all gave back an error.

I'm using this code: (i'm writing this in Form 1)

Private sub textbox_lostfocus()
form2.labelbox.caption = textbox.text
end sub

And i've also tried doing it the other way around (textbox.text = form2.labelbox.caption)

Hope you can help me out.

Thanks in Advance!!! =)


0

Related Posts

See More



Sponsored Link
Ads by Google
Reply to Message Icon

vcf file Using mssp232.dll



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Display in another text box

VC++ DLL accessing MS ACCESS www.computing.net/answers/programming/vc-dll-accessing-ms-access/4966.html

Text box www.computing.net/answers/programming/text-box/2471.html

Displaying value in 2 text box www.computing.net/answers/programming/displaying-value-in-2-text-box/2880.html