PC Review


Reply
Thread Tools Rate Thread

Coding Problem

 
 
Amin
Guest
Posts: n/a
 
      5th May 2010
i have been tying to modify the sample databse for my business needs but a
few things aren't going right like the codes.

i have this code that let the invoice report show up in the sample databse
and i want to stop it from showing how can i doi it. thanks

Private Sub cmdCreateInvoice_Click()
Dim OrderID As Long
Dim InvoiceID As Long

OrderID = Nz(Me![Order ID], 0)

' Gracefully exit if invoice already created
If CustomerOrders.IsInvoiced(OrderID) Then
If MsgBoxYesNo(OrderAlreadyInvoiced) Then
CustomerOrders.PrintInvoice OrderID
End If
ElseIf ValidateOrder(Invoiced_CustomerOrder) Then

' Create Invoice Record
If CustomerOrders.CreateInvoice(OrderID, 0, InvoiceID) Then

' Mark all Order Items Invoiced
' Need to change Inventory Status to SOLD from HOLD
Dim rsw As New RecordsetWrapper
With rsw.GetRecordsetClone(Me.sbfOrderDetails.Form.Recordset)
While Not .EOF
If Not IsNull(![Inventory ID]) And ![Status ID] =
OnHold_OrderItemStatus Then
rsw.Edit
![Status ID] = Invoiced_OrderItemStatus
rsw.Update
Inventory.HoldToSold ![Inventory ID]
End If
rsw.MoveNext
Wend
End With

' Print the Invoice
CustomerOrders.PrintInvoice OrderID

SetFormState
End If
End If
End Sub
 
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
Help with my coding problem? =?Utf-8?B?RGFuIHRoZSBNYW4=?= Microsoft Excel Worksheet Functions 3 11th Sep 2007 12:02 AM
Coding Problem =?Utf-8?B?cGpzY290dA==?= Microsoft Access Form Coding 6 5th Apr 2007 02:47 AM
pic coding problem =?Utf-8?B?Z2hvc3Q=?= Microsoft Access VBA Modules 6 6th Mar 2007 06:43 AM
Coding problem John Microsoft Excel Programming 3 22nd Jun 2005 05:39 PM
Problem with coding Skylar Andersen Microsoft Access Form Coding 2 13th May 2004 07:49 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:36 AM.