PC Review


Reply
Thread Tools Rate Thread

copying some data from one subform to anther

 
 
Simon
Guest
Posts: n/a
 
      29th Nov 2006
I know what i am doing is bad practice as its duplicating data but
there is a reason why i am duplicating it, but its hard to expain

I have a form with two datasheet subforms
There will be data in the top subformform (frmManufactureParts) and i
want to copy it to the botton subfform (frmManufacturePartsUsed)


I want a o click button the the form to do the copy


i currently have the following code


frmManufacturePartsUsed.Form!ProductCode =
frmManufactureParts.Form!IDNumber
frmManufacturePartsUsed.Form!Quantity =
frmManufactureParts.Form!Quantity


This coe only copys the bottom line of data from the datasheet.


Is there a way to make it copy all the data


Thanks

 
Reply With Quote
 
 
 
 
Jeff Boyce
Guest
Posts: n/a
 
      29th Nov 2006
Simon

If you know it is a bad practice, why not ask "is there a way to accomplish
what I need?", rather than asking "how do I do something wrong?"

Since I don't know what it is that you need to accomplish, I can only guess
that you want to "mark" a part as "used" (based on what info you provided).
If this is an accurate guess, there are much easier ways to do this that
what you've asked for help doing.

Regards

Jeff Boyce
Microsoft Office/Access MVP


"Simon" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I know what i am doing is bad practice as its duplicating data but
> there is a reason why i am duplicating it, but its hard to expain
>
> I have a form with two datasheet subforms
> There will be data in the top subformform (frmManufactureParts) and i
> want to copy it to the botton subfform (frmManufacturePartsUsed)
>
>
> I want a o click button the the form to do the copy
>
>
> i currently have the following code
>
>
> frmManufacturePartsUsed.Form!ProductCode =
> frmManufactureParts.Form!IDNumber
> frmManufacturePartsUsed.Form!Quantity =
> frmManufactureParts.Form!Quantity
>
>
> This coe only copys the bottom line of data from the datasheet.
>
>
> Is there a way to make it copy all the data
>
>
> Thanks
>



 
Reply With Quote
 
Simon
Guest
Posts: n/a
 
      29th Nov 2006
I will try and explain what i want to do.
I am building a datbase for manufactuing hot tubs


i have the following tables
tblHotTubs Containers - HotTubID, and ProductName and price
tblProducts Contains the products need to build tub - ProductID,
Product name, Price
tblParts Contains all the parts for each hot tubs -
HotTubID , ProductID, Quantity
tblManufacture Contins the date it was made and HotTubID -
ManufactuerID, Date, HotTubID
tblPartsUsed Contain all the parts used in builidn hot tub -
ManufactureID, ProductID, Quantity, Serials Number


I have a have a form (frmManufactuerTub) where i have a autonumber for
maufactuer ID, i also have a datasheet subform frmPArtsUsed)

what i would like to do is on the main form when i select the hot tub
code what is made it puts all the parts for that hot tub which are
found in tblParts into the subform frmPArtsUsed (tblPArtsUsed)

then once all the intem are in the suform i can add the serial number
of any of the products and can all increase and decreas the products
uses if the hot tub needs to be speceted up or down.


Hope this is clean, if you need any other info just ask, i am just so
struck on how to go about this


Regrads

Simon



Jeff Boyce wrote:
> Simon
>
> If you know it is a bad practice, why not ask "is there a way to accomplish
> what I need?", rather than asking "how do I do something wrong?"
>
> Since I don't know what it is that you need to accomplish, I can only guess
> that you want to "mark" a part as "used" (based on what info you provided).
> If this is an accurate guess, there are much easier ways to do this that
> what you've asked for help doing.
>
> Regards
>
> Jeff Boyce
> Microsoft Office/Access MVP
>
>
> "Simon" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> >I know what i am doing is bad practice as its duplicating data but
> > there is a reason why i am duplicating it, but its hard to expain
> >
> > I have a form with two datasheet subforms
> > There will be data in the top subformform (frmManufactureParts) and i
> > want to copy it to the botton subfform (frmManufacturePartsUsed)
> >
> >
> > I want a o click button the the form to do the copy
> >
> >
> > i currently have the following code
> >
> >
> > frmManufacturePartsUsed.Form!ProductCode =
> > frmManufactureParts.Form!IDNumber
> > frmManufacturePartsUsed.Form!Quantity =
> > frmManufactureParts.Form!Quantity
> >
> >
> > This coe only copys the bottom line of data from the datasheet.
> >
> >
> > Is there a way to make it copy all the data
> >
> >
> > Thanks
> >


 
Reply With Quote
 
Jeff Boyce
Guest
Posts: n/a
 
      30th Nov 2006
Simon

See comments in-line below...

"Simon" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I will try and explain what i want to do.
> I am building a datbase for manufactuing hot tubs
>
>
> i have the following tables
> tblHotTubs Containers - HotTubID, and ProductName and price
> tblProducts Contains the products need to build tub - ProductID,
> Product name, Price
> tblParts Contains all the parts for each hot tubs -
> HotTubID , ProductID, Quantity


So tblParts are the actual parts used in building an actual tub? Or is this
all POSSIBLE parts? I assume tblParts has a primary key of PartsID, not
HotTubID (otherwise, you'd only be able to have one part per tub).

> tblManufacture Contins the date it was made and HotTubID -
> ManufactuerID, Date, HotTubID


Don't use a field called "Date". This is a reserved word in Access and will
only confuse both Access and you. Why isn't the DateOfManufacture stored in
the tblHotTub? (first table listed above)

> tblPartsUsed Contain all the parts used in builidn hot tub -
> ManufactureID, ProductID, Quantity, Serials Number


How are tblParts and tblPartsUsed different? By the way, if you have a
quantity greater than 1, which part's serial number will you record?

> I have a have a form (frmManufactuerTub) where i have a autonumber for
> maufactuer ID, i also have a datasheet subform frmPArtsUsed)
>
> what i would like to do is on the main form when i select the hot tub
> code what is made it puts all the parts for that hot tub which are
> found in tblParts into the subform frmPArtsUsed (tblPArtsUsed)
>
> then once all the intem are in the suform i can add the serial number
> of any of the products and can all increase and decreas the products
> uses if the hot tub needs to be speceted up or down.


Does this mean that a hot tub normally is comprised of, for example, parts
1, 3, 5, so you want to see parts 1, 3, and 5 show up ... but you can then
add/remove parts and change quantities and ...?

Here's another approach that might work...

If you've ever used one of the Access New Query wizards, you've seen the use
of paired listboxes. That is, the list on the left shows what is available,
while the listbox on the right is for what is selected. I can imagine
setting up a form so that you could pick a hot tub model from a combo box
and get all of that model's parts showing in the left-hand listbox, then
select parts to be included in the exact hot tub you are building (to show
in the right-hand listbox).

Does that sound like what you are trying to accomplish?

Regards

Jeff Boyce
Microsoft Office/Access MVP

>
>
> Hope this is clean, if you need any other info just ask, i am just so
> struck on how to go about this
>
>
> Regrads
>
> Simon



 
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
Copying data from form to subform Steve via AccessMonster.com Microsoft Access Forms 1 12th Feb 2007 11:06 PM
copying data from subform to subform Simon Microsoft Access 1 29th Nov 2006 06:34 PM
copying data from subform to subform Simon Microsoft Access 0 29th Nov 2006 05:51 PM
copying data from subform to subform Simon Microsoft Access 1 28th Nov 2006 08:57 PM
Copying data into a subform =?Utf-8?B?U2hhcm9u?= Microsoft Access Form Coding 0 5th Jul 2006 05:55 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:34 AM.