473,734 Members | 2,567 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Copying between subforms, help please.

Hi all, I would appreciate some help please.
I just need pointing in the right direction as I am at a loss.
Basically I have a form (frmAddMaster) which displays two subforms
"Master Stock subform" and "Client Stock Template subform".
Each subform contains the following fields "Product ID,Product Description
and Size".
What I am trying to do is to select rows from the "Master Stock subform" and
copy them
to "Client Stock Template subform". I have created a macro which works but
only for
the "Product ID" field, it will not copy the rest of the row.
However if I manually select a row in "Master Stock subform" using the
cursor and then right click and
select copy, then move to the "Master Stock subform", select "Paste Append"
from the "Edit"
menu it works fine, what I want to be able to do is to select the rows from
"Master Stock subform"
then click a command button to automate the cut and paste process, is this
possible?

Regards, Dave.
--
--
radioman

Please remove "spamnot" to reply.

http://homepage.ntlworld.com/daves.den


Nov 12 '05 #1
3 1355
R-man:

A clarification: you don't really move data from subform to subform;
you move data from table to table. The subforms only display the
data.

Assuming that your subforms are based on different tables (implied in
your description below), copying a record from one table to another
can be done via a query. You just need to
- create the query that copies the data
- run the query at the appropriate time
- requery the 2nd subform to show the new record

You could maybe use "parameter query" (see help if you don't know
about these).

Give us more detail about your macro. It sound as if you're almost
there.

-Matt

On Sat, 10 Apr 2004 15:13:41 +0100, "radioman"
<sp************ **@ntlworld.com > wrote:
Hi all, I would appreciate some help please.
I just need pointing in the right direction as I am at a loss.
Basically I have a form (frmAddMaster) which displays two subforms
"Master Stock subform" and "Client Stock Template subform".
Each subform contains the following fields "Product ID,Product Description
and Size".
What I am trying to do is to select rows from the "Master Stock subform" and
copy them
to "Client Stock Template subform". I have created a macro which works but
only for
the "Product ID" field, it will not copy the rest of the row.
However if I manually select a row in "Master Stock subform" using the
cursor and then right click and
select copy, then move to the "Master Stock subform", select "Paste Append"
from the "Edit"
menu it works fine, what I want to be able to do is to select the rows from
"Master Stock subform"
then click a command button to automate the cut and paste process, is this
possible?

Regards, Dave.
--


Nov 12 '05 #2
Hi Matt, thanks for the reply.
Yes I understand that the subform is only displaying what is
in tables and yes, there are two different tables.
Perhaps a little background will make things clearer.

My cousin runs his own business as a Stocktaker to the
Licensed Trade and is using an old DOS based program which
is no longer supported. I rather foolishly suggested I could write
a replacement using Access for him to use, although I have had some
experience with Access I am still very much a beginner, consequently my
request for help.

Basically the macro is trying to replicate the manual cut and paste
operation.
Macro Name: CopyItems
Action: GoToControl Master Stock subform Select subform.
Action: RunCommand Copy Copy selected data.
Action: GoToControl Client Stock Template subform Select Client
stock subform.
Action: RunCommand PasteAppend Append to Client Stock Table.

As I say this works but only for the first field "Product ID".
--
--
radioman

Please remove "spamnot" to reply.

http://homepage.ntlworld.com/daves.den

"Matthew Sullivan" <Ma**@NoSpam.co m> wrote in message
news:dr******** *************** *********@4ax.c om...
R-man:

A clarification: you don't really move data from subform to subform;
you move data from table to table. The subforms only display the
data.

Assuming that your subforms are based on different tables (implied in
your description below), copying a record from one table to another
can be done via a query. You just need to
- create the query that copies the data
- run the query at the appropriate time
- requery the 2nd subform to show the new record

You could maybe use "parameter query" (see help if you don't know
about these).

Give us more detail about your macro. It sound as if you're almost
there.

-Matt

On Sat, 10 Apr 2004 15:13:41 +0100, "radioman"
<sp************ **@ntlworld.com > wrote:
Hi all, I would appreciate some help please.
I just need pointing in the right direction as I am at a loss.
Basically I have a form (frmAddMaster) which displays two subforms
"Master Stock subform" and "Client Stock Template subform".
Each subform contains the following fields "Product ID,Product Descriptionand Size".
What I am trying to do is to select rows from the "Master Stock subform" andcopy them
to "Client Stock Template subform". I have created a macro which works butonly for
the "Product ID" field, it will not copy the rest of the row.
However if I manually select a row in "Master Stock subform" using the
cursor and then right click and
select copy, then move to the "Master Stock subform", select "Paste Append"from the "Edit"
menu it works fine, what I want to be able to do is to select the rows from"Master Stock subform"
then click a command button to automate the cut and paste process, is thispossible?

Regards, Dave.
--

Nov 12 '05 #3
R-Man:

If I were doing it for myself, I'd use a Parameter Query.

A Parameter Query would basically be a query that appends a record
from the Master table into the Client table. You would give it a
criterion for the Product ID. That criterion would be a reference to
the Product ID of the selected record in on the Master subform, and
would have a syntax like this:

[Forms]![frm_TheParentFo rm]![chd_SubformCont rol]![txt_TheSubformC ontrol]

See the Help for more info about Parameter Queries.

-Matt

On Mon, 12 Apr 2004 08:22:15 +0100, "radioman"
<sp************ **@ntlworld.com > wrote:
Hi Matt, thanks for the reply.
Yes I understand that the subform is only displaying what is
in tables and yes, there are two different tables.
Perhaps a little background will make things clearer.

My cousin runs his own business as a Stocktaker to the
Licensed Trade and is using an old DOS based program which
is no longer supported. I rather foolishly suggested I could write
a replacement using Access for him to use, although I have had some
experience with Access I am still very much a beginner, consequently my
request for help.

Basically the macro is trying to replicate the manual cut and paste
operation.
Macro Name: CopyItems
Action: GoToControl Master Stock subform Select subform.
Action: RunCommand Copy Copy selected data.
Action: GoToControl Client Stock Template subform Select Client
stock subform.
Action: RunCommand PasteAppend Append to Client Stock Table.

As I say this works but only for the first field "Product ID".
--


Nov 12 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
7472
by: JJMM | last post by:
Hi, I have a form (form1) with a large number of subforms inside it (around 20 subforms), There is the possibility of filtering the data using a pop-up form that create/change a query (all the subforms are linked to that query), Once that I create/change the query (using the pop-up form), Is there any easy way to update all the 20 subforms inside form1?. Normally I use to change the recordsource in each subform to show the
3
3421
by: radioman | last post by:
Hi all, I would appreciate some help please. I just need pointing in the right direction as I am at a loss. Basically I have a form (frmAddMaster) which displays two subforms "Master Stock subform" and "Client Stock Template subform". Each subform contains the following fields "Product ID,Product Description and Size". What I am trying to do is to select rows from the "Master Stock subform" and copy them to "Client Stock Template...
1
2991
by: M Wells | last post by:
Hi All, I am developing an Access 2003 project application with the back end in SQL Server 2003. I have a master form that tracks projects, and several subforms on it that track various aspects of the project. On the masterform I have two unbound listboxes that I populate with information regarding the current record in one of the subforms.
2
3001
by: Jack | last post by:
Hi all, I searched the archives and found everyone happy with Stephen's MouseWheel On/Off code except for those with subforms. Stephen's page indicates that he has added code to handle subforms ("Bug Fix for SubForms with ScrollBars. Bug fix for SubForms without visible ScrollBars.") - BUT I still can't get it to work on my app with my subforms. I'm using Access 2000, It works fine on the main forms but not on the
0
2242
by: Jack | last post by:
Gday everyone, I'm dearly hoping Stephen Lebans is going to update his masterpeice to stop the mouse wheel scrolling to work on subforms *he has indicated this to me but of course beggers can't be choosers here so I have no idea when this would be done*. I'm just wondering if anyone has gotten around the problem some other way? --Original Thread---
3
3846
by: Diana Gard | last post by:
Perhaps this is a design flaw, please let me know. I'm using Access 2000. I have a form with a tab control and 5 subforms within those tabs. The forms match with the tables: Client main, Intake, Financial, Fees, Payments, Bills, Bill Line Items. The design works thusly - Client Main relates to Intake. Intake relates to financial. Financial relates Fees, Payments and Bills. Bills relates to Bill Line Items. On the form, I use the...
12
2017
by: Paul T. RONG | last post by:
Is it possible to divide a tall subform with 80 records to two subforms each with 40 records? Dear All, What I have: Tables: tblProduct, tblOrder, tblOrderDetail
0
1462
by: misscrf | last post by:
I have an entry form which has a tab control. If print screens are needed, please let me know and I will prepare them and post them. Anyway, this tab control has 3 pages. When I am on one of the pages, it has 2 subforms. Now I do have onexit code for the last field of the 2nd form, which sets focus to the first field of the next form on the next page. Here is the thing. A user might be on the last subform on the last page. Then they...
0
1054
by: estelling | last post by:
Hello, I hope someone can help me with this, cause I'm trying a lot of things, but without success.... For information: I 've created a database in Microsoft Access 2000, for telephony registration. The database has 4 tables named; "Gebruikers", "Toestellen", "Simkaarten" and "uitgiftegegevens" I'm working on a form named; "uitgiftegegevens" and it's based on the table "Gebruikers". In this form I created three subforms (in a tab...
4
6058
by: Harlequin | last post by:
I have a question concerning the need to trigger events within a "child" subform which is itself enbedded within a master "parent" form and which is accessible via a tab in the parent form. Becuase this is all very difficult to explain in words, please bear with me as I endevour to explain what it is I am trying to do. It would be helpful if I could attach a graphics file to this posting that would help explain what it is I'm trying to achieve...
0
8776
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9449
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9310
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9236
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
6031
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4550
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3261
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
2
2724
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2180
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.