General information
Category:
Coding, syntax & commands
Public Sub procNewOrderInputs()
'Stores the last ayanumber that exists in the Database:
Dim NewOrderNum As Long
' Stores the generated number (ie)
' Dim generatednumber As String
'-------------------- REFERENCE TO DataAccess.clsAddOrder --------------------
Set useAddOrder = New DataAccess.clsAddOrder
'----------------------------------- END REFERENCE ---------------------------
'------------------RETURNED RECORDSET: AFTER INSERT HAS TAKEN PLACE ----------
' Dim rsValuesAfterInsert As ADODB.Recordset
' Set rsValuesAfterInsert = New ADODB.Recordset
Dim rsNumber As ADODB.Recordset
Set rsNumber = New ADODB.Recordset
'-----------------------------------------------------------------------------
'Reads in all inputs from the AddOrders form
If lblCustomer.Caption = "" Then
MsgBox " Enter a customer " ', vbOKOnly, "Order Entry"
Else
' Read new order inputs
glbCustomer = lblCustomer.Caption
glbFinish = Trim(cmbFinish.Text)
glbSite = txtsite.Text
glbLot = txtlot.Text
glbDoorStyle = Trim(cmbDoorstyle.Text)
glbReceivedDate = Date
glbInternalCode = cmbInternalCode.Text
glbService = cmbNS.Text
Set rsNumber = useAddOrder.funcAddOrder(glbService, glbInternalCode, Trim(glbCustomer), Trim(glbSite), Trim(glbLot), glbFinish, glbDoorStyle, glbReceivedDate, "", "", "", "", "", "", "parent")
If Not (rsNumber Is Nothing) Then
Dim generatednumber As String
NewOrderNum = rsNumber.Fields(0).Value
generatednumber = glbService + " - " + glbInternalCode + " - " + Str(NewOrderNum)
MsgBox " " + generatednumber, vbApplicationModal, "Aya Order Number "
'Clear the add order form controls
Call procClearControls
Else
MsgBox " Order Cancelled, Duplicate Insert ", vbInformation, " DUPLICATE ORDER "
Call procClearControls
End If
End If
End Sub
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only