PC Review


Reply
Thread Tools Rate Thread

Copy a textbox to the Subform where are three or more rows.

 
 
=?Utf-8?B?bGRpYXo=?=
Guest
Posts: n/a
 
      19th Feb 2006


I want to copy Value.text to the Subform
Named: SuBformInter where the field is: ValueR.text, but in the subform
there are three rows and in the main form the Value.text is just one.

could you help

--
Lorenzo DÃ*az
Cad Technician
 
Reply With Quote
 
 
 
 
John Vinson
Guest
Posts: n/a
 
      19th Feb 2006
On Sat, 18 Feb 2006 19:58:27 -0800, "ldiaz"
<(E-Mail Removed)> wrote:

>
>
>I want to copy Value.text to the Subform
>Named: SuBformInter where the field is: ValueR.text, but in the subform
>there are three rows and in the main form the Value.text is just one.
>
>could you help


You can't copy to the Subform, since the subform is just a window.
Data is stored in tables, not in subforms; and only one record on the
subform is "active" at any given time. You actually are asking how to
copy data into the subform's Table - not the subform itself.

Do you want to *update* three existing rows in the subform's Table? Or
add three new rows? What if there are five rows in the subform - do
you want to update only three, and if so which three? or all five?

You'll need to use an Update query to update existing rows, and an
Append query to add new ones; this query can be launched from some VBA
code.


One other possibility, which may not be what you want: if you want
Value.Text to be automatically added to ValueR.Text whenever you enter
a new record on the subform, simply include Value in the Subform's
MasterLinkField property, and ValueR in the ChildLinkField. If (as I
presume) there already is a field in these properties, just put a
semicolon and the new fieldname after it.

John W. Vinson[MVP]
 
Reply With Quote
 
=?Utf-8?B?bGRpYXo=?=
Guest
Posts: n/a
 
      19th Feb 2006
Hi Jonh, you are correct, I want to Uopdate these field in the subform with
my field in the form..

could you give me a helping here please

Thanks


--
Lorenzo DÃ*az
Cad Technician


"John Vinson" wrote:

> On Sat, 18 Feb 2006 19:58:27 -0800, "ldiaz"
> <(E-Mail Removed)> wrote:
>
> >
> >
> >I want to copy Value.text to the Subform
> >Named: SuBformInter where the field is: ValueR.text, but in the subform
> >there are three rows and in the main form the Value.text is just one.
> >
> >could you help

>
> You can't copy to the Subform, since the subform is just a window.
> Data is stored in tables, not in subforms; and only one record on the
> subform is "active" at any given time. You actually are asking how to
> copy data into the subform's Table - not the subform itself.
>
> Do you want to *update* three existing rows in the subform's Table? Or
> add three new rows? What if there are five rows in the subform - do
> you want to update only three, and if so which three? or all five?
>
> You'll need to use an Update query to update existing rows, and an
> Append query to add new ones; this query can be launched from some VBA
> code.
>
>
> One other possibility, which may not be what you want: if you want
> Value.Text to be automatically added to ValueR.Text whenever you enter
> a new record on the subform, simply include Value in the Subform's
> MasterLinkField property, and ValueR in the ChildLinkField. If (as I
> presume) there already is a field in these properties, just put a
> semicolon and the new fieldname after it.
>
> John W. Vinson[MVP]
>

 
Reply With Quote
 
John Vinson
Guest
Posts: n/a
 
      20th Feb 2006
On Sun, 19 Feb 2006 08:51:27 -0800, "ldiaz"
<(E-Mail Removed)> wrote:

>Hi Jonh, you are correct, I want to Uopdate these field in the subform with
>my field in the form..
>
>could you give me a helping here please
>
>Thanks


Again...

YOU ARE WRONG.

You *keep* saying you want to update the field in the Subform. *You
CANNOT do this*.

A subform *does not have fields*. A subform *does not store data*.

A Table has fields - these may be displayed in controls on a Form or a
Subform, but the data *IS NOT IN THE FORM*. The data is in the Table,
and it is ONLY in the table.

Since I do not know the structure of your Table, I can't write the
update query for you, but it would be *something* like

UPDATE yourtable
SET ValueR = [Forms]![YourForm]![Value]
WHERE yourtable.IDField = [Forms]![YourForm]![IDField]

where IDfield is the field relating the main table to the related
table; it would typically be the Master/Child Link Field property of
the subform.

You could save this query as updMyUpdateQuery, and execute it from a
Macro in the Click event of the button on the mainform.

I will be out of town for a week so if you need more help please start
a new thread.
John W. Vinson[MVP]


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy contents of one textbox to another textbox on the same form mgolding General Software 0 14th Sep 2011 11:05 PM
Date validation in subform textbox dependent upon form textbox kmsacca Microsoft Access Forms 1 26th Aug 2009 12:16 AM
Total sum in textbox of report footer and displayed in textbox on a subform bobbymo25 Microsoft Access Forms 5 27th Nov 2006 04:13 AM
value in textbox of a subform of subform of main form =?Utf-8?B?VkdS?= Microsoft Access Forms 1 14th Feb 2006 06:58 AM
Copy Textbox Value from form to subform textbox James Microsoft Access Forms 0 18th Sep 2003 08:23 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:58 PM.