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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Question about fields

Status
Not open for further replies.

Rogueuk

IS-IT--Management
Oct 10, 2000
2
GB
I am in the middle of designing a form.
Part of it requires a user to enter a number into one field.
What I need is for that number to be computed for another field but having 3 subtracted from the total.
I have tried everything I can think of....now I need help!!!
 
Create a button, with the following sourcecode
This code does not substract however, but provides you with a number as a integer. Users cannot enter a "non"numeric value (code requires a field called 'number').
Hope this will help. Please read the documentation of Notes, it's pretty good.

Sub Click(Source As Button)
Dim workspace As New NotesUIWorkspace
Dim session As New NotesSession
Dim uidoc As NotesUIDocument
Dim doc As NotesDocument
Dim num As Variant

Set uidoc = workspace.CurrentDocument
Set doc = uidoc.document

num = Inputbox("number")

While Not Isnumeric(num)
Messagebox "No Number!" 'A number was not entered
num = Inputbox("A number please.")
Wend 'End of WHILE loop

doc.number=num
Call uidoc.refresh
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top