Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Weird errors
Message
From
21/05/2002 13:53:01
Alvin Lourdes
Children and Youth Services Cluster
Toronto, Ontario, Canada
 
 
To
21/05/2002 13:04:58
General information
Forum:
Visual Basic
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00659469
Message ID:
00659503
Views:
32
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
Map
View

Click here to load this message in the networking platform