Access97 secure wrkgrpfile no prob unsecure wrkgrp file runtime er

J

JoeQ

Hello,
I have developed a Frontend/Backend database solution. The code resides in
the frontend data in the backend. I join a secure workgroup file syssec.mda
when I modify the code and then distribute to my users that have an unsecured
system.mdw and thus they are locked out of my code.
My problem is that latest update to the front end distributed to end users
is generating a error:
Run-time 91 Object variable or with block variable not set
I can duplicate the same on my system by using the Workgroup administrator
to switch between the two workgroup files when I join:
syssec.mda (my secure workgroup) code runs fine no problem
when I join a generic
system.mdw I get Run-Time error 91
The system generates the error when a macro is used to load a dialog form
that gets a number from a drop down combo box. The user selects the number
and clicks OK. The above error msg appears

The code behind the Ok button is as follows:

Private Sub btn_Ok_Click()
Dim strProvnoToFind As String
If lst_Log.ListCount = 0 Then
MsgBox "There are no Items in the list.", 48, "Read"
Exit Sub
End If
If IsNull(lst_Log) Then
MsgBox "Select an Entry First", 48, "Select"
Else
Select Case m_Mode
Case "Provno"
strProvnoToFind = CStr("Provno = '" & lst_Log.Column(0) & "'")
gme_ErrorCheckBatch strProvnoToFind
End Select
DoCmd.Close acForm, "DoChecks_dlg", acSaveNo
End If
End Sub

Puzzling because code has been working through many generations of changes
and suddenly???
 
T

Tom van Stiphout

On Fri, 18 Jan 2008 15:04:00 -0800, JoeQ

Search the web for "mz-tools". Install it and use it to add line
numbers to your code. Modify your error handler to also report Erl.
Make sure you have an error handler in each procedure.

With the above you'll be able to pinpoint where the error occurs.
Perhaps you'll have an AhaErlebniss. Share it with us.

-Tom.
 
J

JoeQ

Hello Tom,

I did as you suggested adding the mz-tools for line numbers and then dropped
an error handler in and as soon as I did that the routine did not error off
anymore. The routine started working as expected with no problems!!!

I have no idea why, but I think that I'm hearing the Twilight Zone theme
music in the background...

Anyway thanks for taking the time to review this and the suggestion!!

Joe
 

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

Top