|
-
Nov 2nd, 1999, 01:22 AM
#1
Thread Starter
Dazed Member
I have a simple form with two lables and two text boxes with a data control at the bottom of the form to step through a data base that i have.
The code i have works if placed directly in the data control, but i want to place it in a standard module and call it from the first module.
Prviate Sub Data1_ Valadate(Action as Integer, Save As Integer)
Call Module1.Update
End Sub
NOW I HAVE THIS IN A STANDARD MODULE
Sub Update()
If Save = True Then
If MsgBox(" Are you sure that you want to make these changes", vbYesNo + vbDefaultButton2 + vbQuestion)= vbNo Then
Save = False
End If
End If
End Sub
Thanxxxxxxxx.
-
Nov 2nd, 1999, 07:28 AM
#2
Member
Hi,
Code:
Prviate Sub Data1_ Valadate(Action as Integer, Save As Integer)
'0 is evaluated as False and other than zero are True
If Save then 'If value of the Save is not zero
If MsgBox("Are you sure that you want to make these changes", vbYesNo + vbDefaultButton2 + vbQuestion)= vbNo Then
'Do Cancel Procedure
Else
Update 'u don't need to reference module name just call the procedule
End If
Else 'If value of the Save is zero
'Don't Save
End if
End Sub
In the Module,
Public Sub Update()
'Do Update Procedure
End Sub
HTH
Joon
[This message has been edited by jpark (edited 11-02-1999).]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|