G'day JoeAtWork
Yeh, you do have to take users' responses with a grain of salt!
However, I have seen probs that I couldn't replicate in my dev environment... slow network problems, JET versions not current, and so on.
tania20, if you have no way to look over the client's shoulder (the best way, as JoeAtWork suggested), it may not help to get their db, as you may find it just continues to work on your workstation.
One thing you could try is to subscribe to GoToMeeting (but a bit pricey), as this allows you to take control of the user's pc, and try debugging it yourself.
If that's not an option, I'd add some conditional debugging info, eg:
Code:
function myFunc()
...
[b]Const cDEBUG%=True[/b]
Dim iCnt&
...
Set rs = db.OpenRecordset("LTOT_second_oxygen2", dbOpenDynaset)
[b]' check that the recordset really did return some records
if cDEBUG then
rs.MoveLast: iCnt=rs.RecordCount
msgbox "Records returned: " & iCnt
end If
' check we have a value
if cDEBUG then msgbox "Find HospitalNumber: " & _
Me![general_info.HospitalNumber][/b]
rs.FindFirst "[HospitalNumber] = '" & _
Me![general_info.HospitalNumber] & "'"
If rs.NoMatch Then
[b]' see if we had a match
if cDEBUG then msgbox "No match found"[/b]
rs.AddNew
rs![HospitalNumber] = Me![general_info.HospitalNumber]
rs.Update
[b]' let's see if a record was added
if cDEBUG then
rs.Bookmark = rs.LastModified
msgbox "Last record added: " & _
rs![HospitalNumber]
endif[/b]
End If
... more code
end function
Using this, you'll only need to ask your user to toggle the const cDEBUG to True, and back to False.
Or you could even temporarily add a checkbox 'cDEBUG' on the form that call the function, and use that to toggle the debugging.
HTH
Max Hugen
Australia