Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I have a form which has an unbound

Status
Not open for further replies.

MooseMan

IS-IT--Management
Aug 25, 2001
63
0
0
CA
I have a form which has an unbound list box which displays the total advances made by a producer. A command button from that form opens a frmNewAdvance form (leaving the first form open) which allows data entry.

One of the fields on the frmNewAdvance is txttotalAdvances.

What I need to do is before updating compare the value entered into txtTotalAdvance with the txtAdvanceTotal on the previous form. If the value is greater the user should get a message box with the warning and then run the undo command.

It should be straight forward but I cannot seem to get it to work.

Any help?
 
Rather than the undo command, could you not put the code in the before update event of the unbound listbox and then set Cancel to True if the user clicks cancel? This will stop any changes being made.

Incidentally why are you using a list box when it sounds like there will only ever be one value shown.

Cheers,

Pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top