ITEMS RECEIVED

  • Thread starter jhuncabas via AccessMonster.com
  • Start date
J

jhuncabas via AccessMonster.com

Hello EXPERTS! Could you please help me regarding the BELOW PROBLEMS?

We have the table product received in which, whatever the Items Received by
the user will INSERT automatically in Product Received Details, say the
example below:

Let say, the user received 10 Units of Bravia LCD TV 32â€, with having same
product name, part number, supplier and unit rate,
Table 1:
Product Received

Product Name: Bravia LCD TV
Quantity per Box: 1
Part Number: 8976-BVLCD32
Date Entered: 19th Nov 2008
Supplier: Sony
Unit Rate in USD: 1,000

ENTER ITEMS RECEIVED: 10

Table 2
Product Received Details:


Item # Serial # Product Name Quantity Part Number Date Entered Supplier
Uprice
1 Bravia LCD TV 1 8976-BVLCD32 19-11-2008 Sony 1,000
2 Bravia LCD TV 1 8976-BVLCD32 19-11-2008 Sony 1,000
3 Bravia LCD TV 1 8976-BVLCD32 19-11-2008 Sony 1,000
4 Bravia LCD TV 1 8976-BVLCD32 19-11-2008 Sony 1,000
5 Bravia LCD TV 1 8976-BVLCD32 19-11-2008 Sony 1,000
6 Bravia LCD TV 1 8976-BVLCD32 19-11-2008 Sony 1,000
7 Bravia LCD TV 1 8976-BVLCD32 19-11-2008 Sony 1,000
8 Bravia LCD TV 1 8976-BVLCD32 19-11-2008 Sony 1,000
9 Bravia LCD TV 1 8976-BVLCD32 19-11-2008 Sony 1,000
10 Bravia LCD TV 1 8976-BVLCD32 19-11-2008
Sony 1,000

Is there any chance to INSERT 10 Records to Product Received Details based on
USER INPUT and generate in sub form as shown above?

Please help me EXPERTS! THANKSSSS.....
 
D

Dale Fye

I have a table (tbl_Number) with a single field (intValue) that values from 0
to 9 (10 records total. I then create a query (qry_Numbers) that looks like:

SELECT Tens.intValue * 10 + Ones.intValue as intValue
FROM tbl_Number as Tens, tbl_Number as Ones

This query generates numbers from 0 to 99

Assuming you are using a form to enter these products in the ProductReceived
table, you could add a button to the form to "Post details" or something like
that.

In the click code of that button, you would have code similar to:

Private sub cmd_Post_Details_Click

dim strsql as string

strsql = "INSERT INTO [Product Received Details] " _
& "(Item#, [Product Name], Quantity, [Part Number], " _
& "[Date Entered], Supplier, Uprice) " _
& "SELECT intValue, '" & me.txt_ProductName & "', " _
& me.txtQuantity & ", " _
& "'" & me.txt_PartNumber & "', " _
& "#" & Date() & "#, " _
& "'" & me.txt_Supplier & "', " _
& me.txt_UPrice _
& " FROM qry_Numbers " _
& "WHERE intValue > 0 AND intValue <= " & me.txt_ItemsRcvd
currentdb.execute strsql, dbfailonerror

me.subDetails.requery

End Sub

--
HTH
Dale

email address is invalid
Please reply to newsgroup only.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top