
01-04-15, 18:17
|
| Όνομα: Κώστας Έκδοση λογισμικού Office: Ms-Office 2010 Γλώσσα λογισμικού Office: Αγγλική | | Εγγραφή: 05-10-2014
Μηνύματα: 22
| |
Φίλε Δημήτρη
Χρησιμοποίησε τον παρακάτω κώδικα και πες μου αν σου δουλεύει. Κώδικας: Private Sub PROKATABOLI_AfterUpdate()
Me.Refresh
On Error GoTo Error_Handler
Dim intAnswer As Integer
Dim stDocName As String
If Me.PROKATABOLI.Value < POSO_Á Then
intAnswer = MsgBox("............ ;", vbYesNo + vbExclamation + vbDefaultButton1, "??e????!")
Select Case intAnswer
Case vbYes
stDocName = "NewPistosi"
DoCmd.OpenForm stDocName, acNormal, acDialog
Forms![NewPistosi]![D5] = Me.[PROKATABOLI]
Forms![NewPistosi]![PERIGRAFIP] = Me.[EPONYMO]
Forms![NewPistosi]![KATIGORIAP] = Me.[ETAIREIA]
MsgBox ".......................................... !", vbInformation, "??e????!"
DoCmd.Close
Response = acDataErrAdded
Case vbNo
stDocName = "NewPistosi"
DoCmd.OpenForm stDocName, acNormal, acDialog
Forms![NewPistosi]![D5] = Me.[PROKATABOLI]
Forms![NewPistosi]![PERIGRAFIP] = Me.[EPONYMO]
MsgBox "..................................... !", vbExclamation, "??e????!"
Response = acDataErrContinue
End Select
ElseIf Me.PROKATABOLI.Value = POSO_Á Then
intAnswer = MsgBox("...............;", vbYesNo + vbExclamation + vbDefaultButton1, "¸ëåã÷ïò!")
Select Case intAnswer
Case vbYes
stDocName = "NewPistosi"
DoCmd.OpenForm stDocName, acNormal, acDialog
Forms![NewPistosi]![D5] = Me.[POSO_A]
Forms![NewPistosi]![D6] = Me.[POSO_A] * -1
MsgBox ".............................. !", vbInformation, "¸ëåã÷ïò!"
DoCmd.Close
Response = acDataErrAdded
Case vbNo
stDocName = "NewPistosi"
DoCmd.OpenForm stDocName, acNormal, acDialog
Forms![NewPistosi]![D6] = Me.[POSO_A] * -1
MsgBox "................................... !", vbExclamation, "¸ëåã÷ïò!"
Response = acDataErrContinue
End Select
End If
Exit_Procedure:
DoCmd.SetWarnings True
Exit Sub
Error_Handler:
MsgBox Err.Number & ", " & Err.Description
Resume Exit_Procedure
Resume
End Sub
Τελευταία επεξεργασία από το χρήστη Rogerk : 01-04-15 στις 18:37.
|