All I'm trying to avoid if the user doesn't enter anything in the JDBCurrencyPrice component. Here's my latest try:
procedure TFrmPhotogrphyMgt.JDBCurrencyPriceExit(Sender: TObject);
begin
if JDBCurrencyPrice.AllowNull = False then
if MessageDlg ('Price can not be left null, continue?', mtConfirmation,
[mbYes, mbNo],0) = mrYes
then
JDBCurrencyPrice.SetFocus;
end;
The behavior is if you enter in other fields and get to the Price and try to tab past it you get the attached error, them you get the MessageDlg above. If you click 'Yes' then you go back and attempt to enter let's say 125.50. Then it get's in a loop with my message and the Stupid Error.
There's got to be a way to do this without the Stupid Error! It seems to me anyone experienced in programming accounting systems has delt with this or maybe not even using a Float field and defining it as Currency this way:
TFloatField(DbfPhotos.FieldByName('PRICE')).Currency:= True;
Okay, other posts are very helpful while I was typing this reply, thanks all!