Results 1 to 3 of 3
  1. #1
    mnaem02 is offline Novice
    Windows 10 Access 2016
    Join Date
    Oct 2017
    Posts
    24

    Access VBA Code

    Hi Experts

    I am making one form where purchase order done and after that goods will be received fully or partially attached is sample in which i am trying to code on buton

    when QTYreceived filled and then user click on button , then filled quntity received rows should be sum up in "Sumqtyrceived" field like "Sumqtyrceived=Sumqtyrceived+QTYreceived"

    because Quantity are received partially and recorded in system
    I am new in codes
    please help
    is there any sample of accdb from where i can learn and apply i have searched in googles but codes are very difficult to understand
    respects your precious tiime
    Form Name PO and below code tried from the google


    Private Sub Command21_Click()
    Dim strSQL As String


    Dim rs As DAO.Recordset
    strSQL = "SELECT PO.PO, PO.GRN, PO.ProductName, PO.Price, PO.QTYOrder, PO.TotalPrice, PO.QTYRecived, PO.SumQTYRecived " & _
    "FROM PO " & _
    "GROUP BY PO.PO, PO.GRN, PO.ProductName, PO.Price, PO.QTYOrder, PO.TotalPrice, PO.QTYRecived, PO.SumQTYRecived " & _
    "HAVING (((PO.PO)=[Forms]![PO]![PO1])); "




    Set rs = CurrentDb.OpenRecordset(strSQL)


    With rs
    If Not .BOF And Not .EOF Then
    .MoveLast
    .MoveFirst
    While (Not .EOF)


    SumQTYRecived = SumQTYRecived + QTYRecived
    QTYRecived = 0




    Wend
    End If
    .Close
    End With


    ExitSub


    Set rs = Nothing


    Exit Sub
    Resume ExitSub
    End Sub




    After this issue solved i want to transfer whole data filed in GRN table because PO is updated frquenty with new grn number on partial received of quantity
    Attached Files Attached Files

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    Here is a link to a free, generic data model that deals with Customers, Orders and partial deliveries. It is generic in that it represents
    the most common facts in this business area. It may be more detailed than you need, so you can add to/remove from as required.
    The related business facts underlying the data model are here.

    It is important to get your tables and relationships designed and tested to match your needs.You can use some "sample data" and test
    model with pencil and paper before getting too deep into forms and code. When your model is tested and matches your needs, you
    now have a blueprint to build your database.

    Good luck.

  3. #3
    mnaem02 is offline Novice
    Windows 10 Access 2016
    Join Date
    Oct 2017
    Posts
    24
    thanks


    purchase order with partial good receive supplier payments

    with this model can it possible i can receive partial and i can pay partial?
    an what vr i will be receiving i can book in PO and then partial receiving will be save with GRN distinct number ?


    but if you can help me on the code i am doing

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 09-22-2016, 02:37 AM
  2. Replies: 5
    Last Post: 08-29-2016, 04:33 AM
  3. update VBA 2.0 code in forms into access 7.0 code
    By toughwg in forum Programming
    Replies: 1
    Last Post: 12-08-2015, 11:40 AM
  4. Word code in Access - How to modify my current code
    By Alexandre Cote in forum Programming
    Replies: 0
    Last Post: 11-15-2010, 08:26 AM
  5. Access 2003 code vs Access 2007 Code
    By ralphjramirez in forum Access
    Replies: 5
    Last Post: 11-23-2009, 12:33 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums