[AccessD] Refreshing a form

Rocky Smolin rockysmolin2 at gmail.com
Sat Dec 10 18:53:13 CST 2022


I'm just doing the fun parts. :o) Keeps my brain nimble gives me the
illusion of productivity. It's all good.

This one is a legacy client. Been working together for 14 years. I wrote
the software that runs three of his businesses.  I tease him asking him if
he lays awake at nights thinking of things to do to the software.  He says
yeah, guilty as charged.

I had a call from another company that I wrote the software for in 2001.
Friend of mine. Company rents audio visual equipment. He sold it to one of
the employees and retired. I haven't heard much from them for a couple of
years.  Then a couple weeks ago, I got a panicky call - seems that a whole
bunch of their inventory items had disappeared from their database.

I said send it over and let me have a look.  It was the damndest thing -
not a corruption - or else the database would have had junk in it and
slammed to an abrupt halt. Not a hardware problem. I've never seen
anything like it. Just whole records gone in an apparently random way.

So I said alright, let's restore from yesterday's backup.  And there was
that pregnant pause that we all know so well. You are doing backups aren't
you? Well, yes, but no one knows where they are. Really? Get your IT guy in
and get an answer.

The answer was that "somehow" the daily backups are no longer occurring -
the last one was in February.  Can I please come in first thing in the
morning?  OK.

A mission critical application used every minute of every business day.
They call it "The Rocky System" and they live and die by it. Go figure.

First thing, I says, do some sleuthing.  Look on all the client machines as
well as the server for a copy of the back end. Sure enough there was one
from August.  So I went to work on that one and found out that the
inventory table wasn't the only table that was Swiss cheese including the
rental agreement header records.  But not, curiously, the Rental Agreement
detail records.. Fine, I will see how much of your data I can recover from
various places and then you can just recreate all the activity you've had
for the last 3 months.

That was the longest work day I've had in years, very challenging, and very
expensive for them.  I had to recreate the PKs in several databases that
had FKs in child tables from that parent  table.  So I turned off the
autonumber on the PK, replaced all the records I could find from the August
backup turned on the PK.

So when I left I gave them sermonette #28 - protect your business from ruin
by doing regular backups, check them from time to time to see that they're
there and you can recover from them, take a copy home every week, and
assign someone the responsibility to see that this is done.  Will they? Not
my problem. I do clean up.  Prevention is on them.

I daresay everyone on this list has a similar story. How many times you
gotta tell 'em...?

r



On Sat, Dec 10, 2022 at 2:56 PM John Colby <jwcolby at gmail.com> wrote:

> And here I thought you were retired.
>
> On Sat, Dec 10, 2022 at 5:44 PM Rocky Smolin <rockysmolin2 at gmail.com>
> wrote:
>
> > This is what I ended up with:
> >
> > If isFormLoaded("frmMaintenanceDashboard") = True Then
> >         Call Forms("frmMaintenanceDashboard").cmdRefresh_Click
> >     End If
> >
> > Since the form - frmTasks - can be opened in two places, I had to check
> to
> > see if frmMaintenanceDashboard was loaded.
> >
> > The whole module looks like this:
> >
> > Private Sub cmdExit_Click()
> >
> >     DoCmd.Close
> >     If isFormLoaded("frmTaskListAll") = True Then
> >         Forms!frmTaskListAll.Form.Requery
> >     End If
> >
> >     If isFormLoaded("frmMaintenanceDashboard") = True Then
> >         Call Forms("frmMaintenanceDashboard").cmdRefresh_Click
> >     End If
> >
> > End Sub
> >
> > The module cmdRefresh_Click has more than just a refresh command:
> >
> > Public Sub cmdRefresh_Click()
> >     DoCmd.RunCommand acCmdSaveRecord
> >
> >     Call MakeMaintenanceDashboardTable
> >
> >     Me.Requery
> >     Me.cmdExit.SetFocus
> >
> > End Sub
> >
> > So I had to make the module Public and call it.  But all works a treat
> now.
> >
> > Thanks to all
> >
> > Rocky
> >
> >
> >
>
>


More information about the AccessD mailing list