Form editing

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

Guest

Hi

I have a form which has 2 subforms on it. I load the form with allowedits
set as false.
Ig you try to edit a field you cant. If you then tab or click on another
field then that can be edited as can the previous. Has anybody come across
this before and how do I prevent it happening?

Regards
Paul
 
Sounds like you have something that is programmatically dirtying the form.

Even if the form's AllowEdits is No, you can still programmatically assign a
value to a control. At that point the form is dirty. In their wisdom,
Microsoft decided that if the form is dirty, they had better let you finish
the entry, so you can now edit until that record is saved. Once it is no
longer dirty, no editing is permitted (unless you dirty it programmatically
again.)
 
Hi

Thanks for the pointer but I don't think that is the answer. I have coded a
message box into the form dirty event handler and it doesn't fire this.

Any other ideas?

Thanks
Paul
 
In some versions of Access, the form's Dirty event does not fire if you
dirty the form programmatically.

Set the form's RecordSelector property to Yes.
If the form is dirty, you see a pencil icon in the record selector.
If it is not dirty, the icon is a arrow pointing at the record.
 
Allen Browne said:
In some versions of Access, the form's Dirty event does not fire if you
dirty the form programmatically.

Set the form's RecordSelector property to Yes.
If the form is dirty, you see a pencil icon in the record selector.
If it is not dirty, the icon is a arrow pointing at the record.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.




Hi Allen

Thanks for that. The record selector did show that the form was dirty on
exit from a field. I had some code checking that the First letter was a
capital and that was doing it.

Your help much appreciated.

Regards
Paul
 
Back
Top