PC Review


Reply
Thread Tools Rate Thread

database subforms

 
 
Simon
Guest
Posts: n/a
 
      30th 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

 
Reply With Quote
 
 
 
 
Steve Schapel
Guest
Posts: n/a
 
      30th Nov 2006
Simon,

You could make a query, which includes the tblParts and tblManufacture
tables, joined on the HotTubID field, such that this returns the Parts
data for the hot tub entered in the current frmManufactuerTub record
(use criteria to refer to this combobox, using syntax such as
[Forms]![frmManufactuerTub]![HotTubID]).
THen make this into an Append Query, and nominate tblPartsUsed as the
table to be appended to. Then you can run this query on the Click event
of your command button, or the After Update event of your combobox, and
I think this will do what you asked. In your code, you will probably
need to Requery the subform toget the newly appended parts records to be
displayed.

--
Steve Schapel, Microsoft Access MVP

Simon wrote:
> 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
>

 
Reply With Quote
 
Jesse
Guest
Posts: n/a
 
      30th Nov 2006
If I understand you correctly, what you want is that after you select
your HotTubID, the subform gets populated with all the possible parts
needed to build it. You can do it by using code. After you select the
HotTubID, code will obtain a recordset with the needed parts. You can
then walk the recordset to programatically add the necessary rows to
your subform.


On Nov 30, 10:13 am, "Simon" <S.Dick...@shos.co.uk> wrote:
> 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


 
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
Contact Management Database: Eloquent Subforms. =?Utf-8?B?SWNlYmVyZzEx?= Microsoft Access Forms 3 30th Jan 2007 09:54 PM
Accessing subforms in a library database... =?Utf-8?B?ZG9tbW8=?= Microsoft Access VBA Modules 1 25th Oct 2006 05:12 PM
Split database crawls on Forms with subforms/combo boxes =?Utf-8?B?Um9hZEt5bmc=?= Microsoft Access Form Coding 2 6th May 2006 12:29 AM
2 subforms on a main form - both subforms not refreshing =?Utf-8?B?THl0aGFuZHJh?= Microsoft Access Form Coding 2 20th Apr 2006 08:05 PM
Problem using subforms in a multiple database project =?Utf-8?B?RGF2aWQgRy4=?= Microsoft Access Forms 0 10th Jun 2004 04:12 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:49 AM.