SheilaAlighieri
Technical User
Hi,
I would like to get a user confirmation before subjoined action takes place. I was thinking about using a message box: Call MsgBox("Replace?", vbOKCancel).
But I don't know where to go from there..
Private Sub Button__Add__Click()
Call MsgBox("Replace?", vbOKCancel)
If Me!txtReplace <= Me!txtBudget Then
Me!txtBudget = Me!txtBudget - Me!txtReplace
Me!txtPlanned = Me!txtPlanned + Me!txtReplace
Me!txtReplace = Null
Else
Call MsgBox("Please choose a value less or equal to the budget."
End If
End Sub
One more thing, I would like to show the contents of a text box 'txtReplace' to be shown in my messagebox. Do I have to use a string of some sort?

Sheila
I would like to get a user confirmation before subjoined action takes place. I was thinking about using a message box: Call MsgBox("Replace?", vbOKCancel).
But I don't know where to go from there..
Private Sub Button__Add__Click()
Call MsgBox("Replace?", vbOKCancel)
If Me!txtReplace <= Me!txtBudget Then
Me!txtBudget = Me!txtBudget - Me!txtReplace
Me!txtPlanned = Me!txtPlanned + Me!txtReplace
Me!txtReplace = Null
Else
Call MsgBox("Please choose a value less or equal to the budget."
End If
End Sub
One more thing, I would like to show the contents of a text box 'txtReplace' to be shown in my messagebox. Do I have to use a string of some sort?
Sheila