Results 1 to 2 of 2
  1. #1
    burrina's Avatar
    burrina is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383

    Post Invoice as Paid Criteria

    I am having some design questions about my Inventory Database. Mainly about the Status of the Order and Criteria to be set.
    Here is my code for the Post as Paid command button that allows you to view/print Invoice if criteria is met.
    My questions are;
    1. Do I lock the required fields after a Invoice has been Posted as Paid?


    2. Create a command button to ask why they need to change it and what they need to change?
    3. What else should I be aware of that I may be missing?

    Private Sub CreateNewOrder_Click() 'Purpose,To check for criteria before allowing Post as Paid

    Dim AddItemsAsInventorymsgbox As String 'Checks For Posting Criteria,Allows Viewing Invoice
    If [OrderStatus] = "Posted" Then
    AddItemsAsInventorymsgbox = MsgBox("Order Has Already Been Posted,Do You Need To View Invoice?", vbInformation + vbYesNo, "ProductDetails")
    If (AddItemsAsInventorymsgbox = vbYes) Then
    DoCmd.OpenReport "CustomerInvoice", acViewPreview
    Else
    End If
    End If
    Exit Sub

    If txtamountdue > 0 Or txtbalance > 0 Then 'Asks if this will be a Partial Invoice,set Label on Report to Visible
    PartialInvoicemsgbox = MsgBox("Will This Reference a Partial Invoice?", vbInformation + vbYesNo, "OrderDetails")
    If (PartialInvoicemsgbox = vbYes) Then
    lblonhold.Visible = True
    DoCmd.OpenReport "CustomerInvoice", acViewPreview
    lblpartialinvoice.Visible = True
    Else
    lblonhold.Visible = False
    lblpartialinvoice.Visible = False
    Exit Sub
    End If
    End If

    DoCmd.SetWarnings False
    If txtamountdue = 0 And txtbalance = 0 Then
    End If
    If txtamountdue > 0 And txtbalance > 0 Then
    MsgBox "You Have a Balance or Amount Due Pending"
    Exit Sub
    If DCount("*", "qryAllRecordsStatus") > 0 Then
    MsgBox "You Have Items Not Yet Posted"
    Exit Sub
    End If

    If IsNull([CustomerID]) Then
    MsgBox "A Customer is Required"
    ElseIf IsNull([EmployeeID]) Then
    MsgBox "A Employee is Required"
    ElseIf IsNull([ShippingMethodID]) Then
    MsgBox " A Shipping Method is Required"
    ElseIf IsNull([OrderedBy]) Then
    MsgBox "Employee Who is Ordereding is Required"
    ElseIf IsNull([OrderDate]) Then
    MsgBox "A Order Date is Required"
    ElseIf IsNull([PurchaseOrderNumber]) Then
    MsgBox "A Purchase Order Number is Required"
    ElseIf IsNull([SubmittedBy]) Then
    MsgBox "Person Submitting Order is Required"
    ElseIf IsNull([ClosedBy]) Then
    MsgBox "Person Who is Closing Order is Required"
    ElseIf IsNull([ShipDate]) Then
    MsgBox "A Shipping Date is Required"
    ElseIf IsNull([SubmittedDte]) Then
    MsgBox "A Submitted Date is Required"
    ElseIf IsNull([ClosedDte]) Then
    MsgBox "A Closed Date is Required"
    End If
    Else: lblpaid.Visible = True 'Displays Paid Label
    [OrderStatus] = "Posted" 'Sets Order Status To Posted as in Paid in Full
    Me.CreateNewOrder.Enabled = False
    If Me.Dirty Then Me.Dirty = False 'Forces a Save Record.
    DoCmd.OpenReport "CustomerInvoice", acViewPreview
    DoCmd.SetWarnings True
    End If

    End Sub
    Attached Thumbnails Attached Thumbnails MainMenuMarkedasPaid.jpg   CustomerInvoice.jpg  

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,641
    1. reasonable

    2. not user friendly, user's get frustrated with being second-guessed, but you can do that

    3. Ditto my comments in post 13 of https://www.accessforums.net/forms/s...tml#post151255

    Do you have specific issue with the posted code. Errors, wrong results, nothing happens?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Replies: 8
    Last Post: 12-12-2012, 02:39 PM
  2. Replies: 3
    Last Post: 11-19-2012, 05:05 PM
  3. Replies: 1
    Last Post: 10-10-2012, 01:05 PM
  4. Overall price paid
    By MFS in forum Reports
    Replies: 1
    Last Post: 07-02-2011, 07:19 PM
  5. Mark invoice paid
    By kylebmorris in forum Reports
    Replies: 1
    Last Post: 07-19-2010, 12:39 PM

Tags for this Thread

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