J
jelena
Hello!
I need to generate sequential number of OrderID when I
create a new order for company (Companies/Orders
Folder).Let's say if the last OrderID = 3 under Orders
Folder, I need to generate next OrderID=4 and populate
Orders.txtOrderID when I open a new Order item from
Companies form.
I have some code behind Order form.
How to define Orders folder under Companies and place
Orders.txtOrderID=next_OrderID?
Code below works if I have Orders folder as active.
sub cmd1_click()
Set oClient = CreateObject("MXContact.ClientObject")
Set oFolder = oClient.GetFolderByAlias("Companies")
Set oItems = oFolder.Items
Set oObject = oClient.GetFolderItems(oFolder)
Set oColFolders = oClient.GetFolders()
nFolderCount = oObject.Count
s = oObject.Item(nFolderCount)
s1 = s + 1
msgbox "s1 " & s1
End Sub
Thanks
Jelena
I need to generate sequential number of OrderID when I
create a new order for company (Companies/Orders
Folder).Let's say if the last OrderID = 3 under Orders
Folder, I need to generate next OrderID=4 and populate
Orders.txtOrderID when I open a new Order item from
Companies form.
I have some code behind Order form.
How to define Orders folder under Companies and place
Orders.txtOrderID=next_OrderID?
Code below works if I have Orders folder as active.
sub cmd1_click()
Set oClient = CreateObject("MXContact.ClientObject")
Set oFolder = oClient.GetFolderByAlias("Companies")
Set oItems = oFolder.Items
Set oObject = oClient.GetFolderItems(oFolder)
Set oColFolders = oClient.GetFolders()
nFolderCount = oObject.Count
s = oObject.Item(nFolderCount)
s1 = s + 1
msgbox "s1 " & s1
End Sub
Thanks
Jelena