caringsharingbristolbilly
Board Regular
- Joined
- Mar 23, 2004
- Messages
- 241
Hi guys. I'm just cutting my teeth on VB in Access. I've tried using the help files and a book, but I don't understand how the MsgBox works in VB. I've got the following code, and I've tried every permutation of quotes, square brackets, etc, possible, but I get an error every time.
Could someone have a look at the Msgbox bit of the code and either tell me where I'm going wrong, or give me an example of code that uses the MsgBox command? I'd be ever so grateful... I hope the code should make it obvious what I'm trying to do...
Private Sub Date_Completed_AfterUpdate()
If Me.Date_Completed < Me.Last_Updated Then
MsgBox("The date you have entered is before the date the error was created. Please check the date and try again.", vbOkayOnly, "No!")
Else
End If
End Sub
Any help would, as always, be immensely appreciated. I am not worthy ray:
Could someone have a look at the Msgbox bit of the code and either tell me where I'm going wrong, or give me an example of code that uses the MsgBox command? I'd be ever so grateful... I hope the code should make it obvious what I'm trying to do...
Private Sub Date_Completed_AfterUpdate()
If Me.Date_Completed < Me.Last_Updated Then
MsgBox("The date you have entered is before the date the error was created. Please check the date and try again.", vbOkayOnly, "No!")
Else
End If
End Sub
Any help would, as always, be immensely appreciated. I am not worthy ray: