Firstly, you are opening a recordset for no reason, you never use it.
What message are you seeing, you haven't attached anything?
I've indented your code, and removed the recordset, so you can better see what's happening, and used code tags.
Code:
Dim answer As Integer
If IsNull(Me.[txt2]) Or Me.txt2 & "" = "" Then
answer = MsgBox("Do you Wish to exit program without save data?", vbQuestion + vbYesNo + vbDefaultButton1, "User Repsonse")
If answer = vbNo Then
Me.txt2.SetFocus
Cancel = True
Else
DoCmd.RunCommand acCmdUndo
Exit Sub
End If
End If
Me.OfferNumber = Nz(DMax("offernumber", "grey_offer"), 0) + 1