Re: Runtime Error
- From: Don <Don@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sat, 27 Jun 2009 08:30:01 -0700
One more thing I need to post to complete this subject. John your solution
worked.
However, once I made the change it seemed to make no difference. This has
happened to me before with other versions of Access but always using the 2000
format. I have spent many more hours trying variations of suggested code to
no avail. However, in my struggles and in the past by mistake, I have closed
the db which compacts it (based on my set-up). When I reopen the db the
original suggested code worked? So my recommendation to all new users is if
the suggested code does not work, try to compact the db, close it and then
reopen it and oddly, it works!
--
Thanks,
Dennis
"John W. Vinson" wrote:
On Fri, 26 Jun 2009 13:11:01 -0700, Don <Don@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:.
I am trying to run this code in the On Close or the On Unload event of my form:
Private Sub Form_Unload(Cancel As Integer)
If IsNull(Me.PrintDate) And IsNull(Me.Date) Then
Else
If IsNull(Me.PrintDate) Then
Me.[PrintDate] = Now
Me.DidNotPrint = "Yes"
End If
End If
End Sub
Use the form's BeforeUpdate event instead. Both close and unload come too late
- the record has already been saved to disk at that point.
--
John W. Vinson [MVP]
- Follow-Ups:
- Re: Runtime Error
- From: John W . Vinson
- Re: Runtime Error
- References:
- Runtime Error
- From: Don
- Re: Runtime Error
- From: John W . Vinson
- Runtime Error
- Prev by Date: Re: Incremental search with numbers
- Next by Date: Determine if external application is running
- Previous by thread: Re: Runtime Error
- Next by thread: Re: Runtime Error
- Index(es):
Relevant Pages
|