If Forms!frm_Projects.Dirty Then

  • Thread starter Thread starter MeSteve
  • Start date Start date
M

MeSteve

I have a form that runs this:
If Forms!frm_Projects.Dirty Then Forms!frm_Projects.Dirty = False

It was working perfectly until today. Now when that line is run I get the
following error:
Return without GoSub

What happened and where do I begin fixing?
 
I use this line of code to make sure a record is no longer in dirty status.
It may work for you.

If Me.Dirty Then
DoCmd.RunCommand acCmdSaveRecord
End If
 
Hi Steve

Have you made any changes to any code that might be running when the current
record of frm_Projects is saved? My feeling is that the error is coming,
not from that line, but from some other code that is being triggered by
saving the record.

Also, do you get a message with a "Debug" button when the error occurs?
That would show you the exact line of code. If not, try setting a
breakpoint at that line and then single stepping (F8) until the error
occurs.
 
I established it was this line with the debug.

It must have been some sort of coruption, because I closed this db, opened
another version to copy the code from it in case something had been fat
fingered that I wasn't seeing and upon reopening the offending db all was
well.

???

Thanks for the ideas.
 
Back
Top