Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

save and close dialg alert help, please

Status
Not open for further replies.

bufhal2

Technical User
Dec 13, 2005
26
US
Hello;
I hope someone can offer some help. I have a large Sales Order form and at the Save and Close button I need an alert to come up based on this criteria:
If customershippingaccount = null and shippingcost = 0
then the dialog would read:
The shipping cost is zero ...etc.
Within the dialog would be yes, no buttons. The yes would send along to Production as usual, a no would let the Sales person edit the form.
This is the code for the button as is to save and close.

Sub Click(Source As Button)
Dim session As New NotesSession
Dim db As NotesDatabase
Set db = session.CurrentDatabase
Dim workspace As New NotesUIWorkspace

Set uidoc = workspace.currentdocument
Set currentdoc = uidoc.document
Call uidoc.save
Call uidoc.close

End Sub

If someone can please show the best way to accomplish this it would be greatly appreciated.
Thank you
 
I got the box working with the following Global:
Function isShippingCostOk(Source As Notesuidocument) as Variant
....Dim doc as NotesDocument
....Dim flag as Integer
....
....isShippingCostOk = True '-Default value
....Set doc = Source.Document
....if doc.customershippingaccount(0) = "" and doc.shippingcost(0) = 0 then
......flag = MessageBox("The shipping cost is zero. Proceed?", 35, "Missing Shipping Cost")
......if flag <> 6 then '-Not YES
........isShippingCostOk = False
......end if
....end if
End Function

and QuerySave:
'-Shipping cost check
if Not isShippingCostOk(Source) Then
Continue = False
Exit Sub
End If

The last issue is how to omit one user from seeing the messagebox?

Can anyone show me how I can hide the messagebox from one of our 6 users?
Is it email validation?

Any help is greatly appreciated.



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top