Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Possible issues: Front-end & back-end on Server, multi-user environmen

Status
Not open for further replies.

NoviceGuy

Programmer
May 30, 2003
8
0
0
US
Hello,
I have a simple database for tracking customer complaints with 30 users. The database is split and both front-end and back-end sit on the server. There is functionality in one of the forms which sets the parameter of several fields to locked (no edit) if the value of another field (status) is set to "Resolved". This code exists in the On Current event for the form as well as the On Change event for the status field itself. It's working great so far but some users now experience the following. Occasionally, even though the value in their form for this field is Active (not resolved) the specific fields are actually locked for entry. By switching the value from resolved and back to active, the problem is cured.

Here's the question. Does the fact that the front-end is loaded on the server and that more than one user are in the database using this entry form, mean that the value of the status field (in memory behind the scenes, stored for that variable...) only exists once for all users? Meaning, if user A gets into the form, sets their complaint to Resolved, while user B is still in that form entering an Active complaint, the code in their form now interprets the value to be "Resolved" stemming from the user A's entry?

I haven't done any fancy declaration of variables and am not the greatest at coding vb. Here's the code for the on current and on change events for reference.

Do I have to declare some local variable to store & use the value specific to each user? (not that I know how to do that) or is it wise to load the front-end on to each users local machine? (was avoiding this up front to see how things went, to hopefully avoid additional maintenance hastle of reloading to desktop upon each change.) I know there's a way to do this with a bat file, just haven't yet. This is an iterim database solution, should last about a year or so.

Thanks for any help you might be able to provide!

Noviceguy :)

*******************
Private Sub Form_Current()
Status.SetFocus
If Status.Text = "Resolved" Then
DateResolved.Enabled = True
Resolution.Enabled = True
[Correspondence Per Complaint subform].Locked = True
Else
DateResolved.Enabled = False
Resolution.Enabled = False
[Correspondence Per Complaint subform].Locked = False
End If
[Loan/Deposit].SetFocus
End Sub

Private Sub Status_Change()
Status.SetFocus
If Status.Text = "Resolved" Then
DateResolved.Enabled = True
Resolution.Enabled = True
Comments.Locked = True
DateResolved.SetFocus
[Correspondence Per Complaint subform].Locked = True
ElseIf Status.Text = "Active" Then
DateResolved.Enabled = False
Resolution.Enabled = False
Comments.Locked = False
[Loan/Deposit].SetFocus
[Correspondence Per Complaint subform].Locked = False
End If

End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top