hello All,
actually it is my first post here ,and i want to thank in advance for any help
i have these tables
tblproduct :- productID,ProductName , etc
tbltransaction:- transactionID,TransactionDate,ProductID,LocatonID, UnitsMoved,unitsrecieved
Locationtbl:-locationID,LocationName,
and i have only three location (receiving ,production,finishing)
i am looking for method that whenever i recieve new products throug my PO form to automatically to be added in the receiving ?
i have TransferForm with two combo boxs (from ,TO ) i need to whenever i fill this form and press on save button to do the movement that selected in the Comboboxs?
because when i solve these issues i want to create querys to calculate the quantity for each location only
hope this was explained well
appreciate any help
9 1645 NeoPa 32,556
Expert Mod 16PB
You appear to have explained the concept of your task, but nowhere do you explain what you're having trouble with, nor what you've tried already.
Without these it's difficult to help.
NeoPa 32,556
Expert Mod 16PB
Furthermore, you appear to have posted this same question twice. I'm sure that was a mistake so I will delete the other one for you. Please remember to post your questions only the once in future though.
Welcome to theScripts.
Hello NeoPA
first of sorry for posting my question twice ,,but i thought that no one had read it
and regarding to my question : i need help in the code behind the transfer button to get started ?
thanks ,and happy new year
NeoPa 32,556
Expert Mod 16PB
Apology accepted.
Just to be clear though, that's not a valid excuse to post again. A bump after 24 hours is acceptable but simply reposting your question is not.
As far as your question is concerned, you really need to read and respond to the posts. Post #2 particularly says what is needed for us to help. Your response, if it's in response to this, is really not much help.
Please reread it and answer carefully.
Please bear in mind we are not here to provide a free programming resource. Our intention is to assist, particularly with learning. "Doing it for you" is not an option.
Apology accepted.
Just to be clear though, that's not a valid excuse to post again. A bump after 24 hours is acceptable but simply reposting your question is not.
As far as your question is concerned, you really need to read and respond to the posts. Post #2 particularly says what is needed for us to help. Your response, if it's in response to this, is really not much help.
Please reread it and answer carefully.
Please bear in mind we are not here to provide a free programming resource. Our intention is to assist, particularly with learning. "Doing it for you" is not an option.
ok..here is what i have so far
i have these tbls transactionsTBl
transactionID(PK)
productID (fk)
unit price
units received
unitsmoved
locationID(FK)
transferID locationTBl
locationID
Locationname TransferNotetbl
transferNoteID
TransferFrom
transferTo
transferDate transferDetailtbl
transferDetailID
transferNoteID
productID
transferqty
now i am working on TransferNote form i have created a transfer button and code to transfer items between locations that i have ,and two query 1 to calculate the unitsreceived and another one to calculate the unites moved and this is my code - Dim db As DAO.Database, sSQL As String, rs As DAO.Recordset
-
-
'Set vars
-
Set db = CurrentDb
-
DoCmd.SetWarnings False
-
-
'Controlling recordset based on Order Detail table but constrained for this specific Order number
-
sSQL = "SELECT * FROM transferdetailtbl WHERE transfernoteID = " & Me.transfernoteID
-
Set rs = db.OpenRecordset(sSQL)
-
-
'Start a loop to load each Order Line item
-
While Not rs.EOF 'EOF is End Of File and is a marker to test for the end of the rs
-
'Outward movement
-
'sSQL = "INSERT INTO tblTransactions (TransactionDate,ProductID,LocationID, UnitsMoved,unitsreceived)" & _
-
' " VALUES (#" & Date & "#, " & rs![ProductID] & ", " & Me.Cbofromlocation & ", " & rs![transferqty] & ", 0 )"
-
'db.Execute sSQL
-
-
'Inward movement
-
sSQL = "INSERT INTO tblTransactions (TransactionDate,ProductID,LocationID, UnitsMoved,unitsreceived)" & _
-
" VALUES (#" & Date & "#, '" & rs![ProductID] & "', " & Me.CboToLocation & ", 0," & rs![transferqty] & ")"
-
db.Execute sSQL
-
-
-
'Move onto the next Order Line
-
rs.MoveNext
-
-
'Go back to the head of the loop
-
Wend
-
-
'All done, so close recordset and clear memory allocation
-
rs.Close
-
Set rs = Nothing
-
-
'Reset vars
-
DoCmd.SetWarnings True
-
-
'Confirm completion
-
MsgBox " Goods Received ", , "Info..."
now this code is function fine but my problem is that whenever keep clicking on the transferbutton for each transfer not it does the calculation,,i want it to happen only once for each record ???
any tips in that will be highly appreciated
thanks
NeoPa 32,556
Expert Mod 16PB
You want the system to stop the operator from transferring the same data more than once from the [TransferNotetbl] and [transferDetailtbl] tables? Presumably ever (not just in a single session).
I would suggest adding a flag to the [TransferNotetbl] table indicating that a record has been copied already. If this flag is found to be true then your code should not include it in the list of items that can be copied. it certainly shouldn't allow it to be copied again.
You want the system to stop the operator from transferring the same data more than once from the [TransferNotetbl] and [transferDetailtbl] tables? Presumably ever (not just in a single session).
I would suggest adding a flag to the [TransferNotetbl] table indicating that a record has been copied already. If this flag is found to be true then your code should not include it in the list of items that can be copied. it certainly shouldn't allow it to be copied again.
yes because it keep adding whenever u click again on the transfer button .
yeah that is what i am looking for ,,something like status (pending or done )
but forgive my weakness can u help me with vba code ?
thanks
NeoPa 32,556
Expert Mod 16PB
Have you added a flag field to [TransferNoteTbl]? You need to make a note of the name of that field for your code.
Also, can you post the whole routine please - including the definition (Private Sub ...) and the End Sub line.
Have you added a flag field to [TransferNoteTbl]? You need to make a note of the name of that field for your code.
Also, can you post the whole routine please - including the definition (Private Sub ...) and the End Sub line.
hi ,
sorry for the delay
yes i have added flag field in [transfernoteTbl] named transferstatues and the type Yes/no ,,i want it to be by default No (not transfered ) and the user has to confirm it ,,and once it confirm he can't edit it or to do the transfer again for this record ? - Private Sub Command18_Click()
-
-
Dim db As DAO.Database, sSQL As String, rs As DAO.Recordset
-
-
'Set vars
-
Set db = CurrentDb
-
DoCmd.SetWarnings False
-
-
'Controlling recordset based on Order Detail table but constrained for this specific Order number
-
sSQL = "SELECT * FROM transferdetailtbl WHERE transfernoteID = " & Me.transfernoteID
-
Set rs = db.OpenRecordset(sSQL)
-
-
'Start a loop to load each Order Line item
-
While Not rs.EOF 'EOF is End Of File and is a marker to test for the end of the rs
-
'Outward movement
-
sSQL = "INSERT INTO tblTransactions (TransactionDate,ProductID,LocationID, UnitsMoved,unitsreceived)" & _
-
" VALUES (#" & Date & "#, " & rs![productID] & ", " & Me.Cbofromlocation & ", " & rs![transferqty] & ", 0 )"
-
db.Execute sSQL
-
-
'Inward movement
-
sSQL = "INSERT INTO tblTransactions (TransactionDate,ProductID,LocationID, UnitsMoved,unitsreceived)" & _
-
'" VALUES (#" & Date & "#, '" & rs![ProductID] & "', " & Me.CboToLocation & ", 0," & rs![transferqty] & ")"
-
' db.Execute sSQL
-
-
-
'Move onto the next Order Line
-
rs.MoveNext
-
-
'Go back to the head of the loop
-
Wend
-
-
'All done, so close recordset and clear memory allocation
-
rs.Close
-
Set rs = Nothing
-
-
'Reset vars
-
DoCmd.SetWarnings True
-
-
'Confirm completion
-
MsgBox " Goods Received ", , "Info..."
-
-
End Sub
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Melissa |
last post by:
Products appear on multiple orders in a batch of orders. I created a totals
query with the fields, ProductID and SumOfQuantity. I have a TblProduct table of
products with the fields ProductID,...
|
by: Frank Ruffolo |
last post by:
i've got a basic order entry d-base w/ a form for adding products, etc.
can anyone help me w/ inventory control?
i want to be able to not only enter a new product but also enter the number
of...
|
by: gregork |
last post by:
I have painstakingly created an excel 2000 workbook for the very complex
recipes I have to formulate. I have 2 sheets- 1 for configuring the recipe
and 1 that is like an inventory of all the raw...
|
by: tHeRoBeRtMiTcHeLL |
last post by:
Well,
I think I have bitten off a little more than I can chew (at least all
at once), and I'm only trying to hammer out tables/relationships at the
design level. Which translates to "Seasoned...
|
by: Henrik |
last post by:
Hi all,
I'm a .net developer working with developing automation equipment for the
sawmill industry. The main focus of our product line is mechanical and
measurement equipment but our clients...
|
by: south622 |
last post by:
I'm taking a beginning Java course and I'm stuck in week eight of a nine week course. If anyone could help me I would greatly appreciate it. This assignment was due yesterday and each day I go past...
|
by: =?Utf-8?B?UGF1bCBCdXp6YSwgb2xkc3RlciB1c2luZyBuZXcg |
last post by:
I have developed a web-based inventory system for my estate jewelry business
using ASP.Net 2.0 and Microsoft SQLServer. The inventory database is also the
basis of my website...
|
by: cblank |
last post by:
I need some help if someone could help me. I know everyone is asking for help in java. But for some reason I'm the same as everyone else when it comes to programming in java. I have an inventory...
|
by: 100grand |
last post by:
Modify the Inventory Program to use a GUI. The GUI should display the information one
product at a time, including the item number, the name of the product, the number of
units in stock, the price...
|
by: AmberJain |
last post by:
Windows Autorun FAQs: List of autostart locations
Linked from the Original article- "Windows Autorun FAQs: Description".
Que: Can you list all the autostart locations for windows?
Ans: Here is...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
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...
|
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...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |