Undo command (1 Viewer)

Bigmo2u

Registered User.
Local time
Today, 00:22
Joined
Nov 29, 2005
Messages
200
I am looking for an undo command that will clear specific fields. This is what i ahve so far:

Code:
Private Sub btnClear_Click()

Me.ClaimNo = ""
Me.txtDnDate = ""
Me.txtDNclerk = ""
Me.txtCatCode = ""
Me.txtDnReason = ""
Me.rdDupClaim = 0


End Sub

Problem is that ClaimNo will not clear to null.

ClaimNo is a autoNumber, I have tried to do a delete but the record has not been officially add to the table. The form is a data entry form as well.

Any help would be greatly appreciated.
 

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 22:22
Joined
Aug 30, 2003
Messages
36,132
Have you looked at Undo in VBA Help?
 

Bigmo2u

Registered User.
Local time
Today, 00:22
Joined
Nov 29, 2005
Messages
200
I have several books on VBA but nothing that was detailed enough about it. pbaldy is there any books you can recommend for learning VBA?

This may sounds stupid and I am sorry if it does, but where is VBA help?


Thanks for your reply.
 
Last edited:
Local time
Today, 00:22
Joined
Mar 4, 2008
Messages
3,856
You don't want your autonumber set to null. That is bad.

Have you considered setting the Control Source to "" or null and then resetting it to ClaimNo in the "On Dirty" event?

I'm not sure if it will work but it's worth a shot.
 

Bigmo2u

Registered User.
Local time
Today, 00:22
Joined
Nov 29, 2005
Messages
200
pbaldy - thanks for the link. Books I currently have are 'Acess VBA programming, For the absolute beginner" (love this book, but for beginners) and "Access 2000 Bible"


Forgot about the .ControlSource I swear I am constanly forgetting stuff.

okay time to give a little more info.

tblClaims
tblDnClaims

They are linked by the ClaimNo.

I don't want a claimNo to populate in the tblDnClaims until there is info to be inducted. The form holds both tables on it, so you can if you desired to enter a new claim and deny the claim all at the same time. Sometimes people make mistakes and need to undo that portion of the process. I would prefer that it just be deleted.

another solution is to save the record as-is and then right sql statement to delete that portion.

If I am over thinking this, please tell me.
 
Last edited:

Users who are viewing this thread

Top Bottom