Application behaves differently on different platforms!

P

Paul Fenton

This is a client tracking system that's been in use for about 11
years, running on a 12 station network, front-end, back-end. In the
app is a client information form used to enter/edit/update various
items about the customer.

We have found that the ability to check/uncheck certain boxes on this
particular form is different on my development environment than it is
on my client's network. On my network, things work one way (the
correct way) and on the client's network, things don't work the same
way in one instance. For example, I can uncheck box "A" and then box
"B", in that order. If he tries it, he can't uncheck box "B" til he
hits the Escape key once or twice.

It doesn't matter if I use the .mdb version of the front end or the
..mde version on my system; they both behave the same way. He uses the
..mde version.

Can anyone explain why the same .mde file would behave differently in
two environments? He does have the latest version.


Paul Fenton
 
B

B_A_R_T_M_A_N

Is the checkbox bound to a data field? If so, I ran into something
like that because the backend data table had corrupted and I did a
repair. A co-worker dicsovered that the repair caused some indexes to
drop (including the primary key) which caused the underlying query to
not be updatable, which in turn caused the checkbox not to check or
uncheck. Just a thought...

Bart
 
P

Paul Fenton

Yes, it's bound to a data field. I did a compact and repair on the
data file, but that didn't change the behavior. The underlying table
seems to be fine.

Paul
 
J

John Nurick

Hi Paul,

Does any code run when you check/uncheck the boxes? If so, add some
debugging and logging statements to it so you get a record of what
happens on the client system.
 
P

Paul Fenton

that sounds like a good idea, John. There is code attached to the
boxes, but I'm not sure how to log what happens. Can you give me some
direction with that?


Paul Fenton
 
J

John Nurick

You can make it as simple or complex as you like. Here's a little
logging procedure (which needs the WriteToFile() function at
http://www.j.nurick.dial.pipex.com/Code/VBA/WriteToFile.htm)



Public Sub WriteToLog(S As String)
Const LOG_FILE = "C:\DB_Log.txt" 'make sure this is a folder
'that exists and can be written to
Dim Result As Long

Result = WriteToFile(Now() & vbtab & S & vbCrLf, LOG_FILE, 0)
If Result <> 0 Then
Msgbox "Error " & Result & " (" & Error(Result) & _
") writing to log file " & LOG_FILE, _
vbInformation + vbOkOnly
End If
End Sub

Then it's just a matter of writing appropriate messages to the log at
strategic points in the code. Usually it helps to have a global variable
or constant to switch the logging on or off:

Const DEBUGGING As Boolean = True

So you might end up with something like this in the Click event
procedure for the checkbox XXX

Private Sub XXX_Click()
If Debugging Then
WriteToLog "Starting XXX_Click()"
WriteToLog "Value of XXX is " & Me.XXX.Value
WriteToLog "Value of OtherControl is " & Me.OtherControl.Value
End If
...

If Debugging Then WriteToLog "Exiting XXX_Click()"
End Sub

Once you've got it all working on your computer and you understand the
log files, send the "debugging" version of the front end to the client
and get him to go through the motions and send his log file back to you.
With any luck this will give you enough of a hint.

Something else I've just thought of, though I'm not sure it's relevant
with an MDE front end: in the VBE options, make sure that the "Break on
errors" settings are the same on your machine and the client's.
 
P

Paul Fenton

John, thank you very much. I'll try this and let you know if it
works.

Paul Fenton
 

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