Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
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 !!! =)

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.

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!! =)

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

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
- lostfocusbut 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 subAnd i've also tried doing it the other way around (textbox.text = form2.labelbox.caption)
Hope you can help me out.
Thanks in Advance!!! =)

![]() |
vcf file
|
Using mssp232.dll
|

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