Cannot change fields once an amount is entered

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a form that the figures that are entered into it go into an invoice. I
need the figures to not be able to be changed after an amount is entered into
a field, if any changes need to be made the changes need to go into another
field on the form and then that field cannot be able to be changed. (I hope
this makes sense). I am not sure how to go about doing this. I have tried to
make the field not enabled but it keeps crashing on me.
 
I don't know where you are trying to set the enabled property for the
control, but you cannot do it while it has the focus, even in the Lost Focus
event.

One way to accomplish this it to create a hidden text box (Visible = No)
also set Tab Stop = No so it wont confuse the user.

Then in the After Update event of the control you want to disable, set the
focus to the hidden control. In the Got Focus event of the hidden control,
disable the other control, then set the focus to the next control after the
disabled control in the Tab Order sequence.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top