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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Different errors on different machines? 1

Status
Not open for further replies.

JSD

Technical User
Jan 18, 2002
189
US
Hello

I am working with a db on a network with multiple users. There are four different computers using it.

I am running this code after update of a 'wc' control:

If DCount("[wc_code]", "dbo_rtemastr", "[wc_code]='" & Me!wc & "'") > 0 Then
'Do nothing
Else
MsgBox "This is not a valid workcenter."
Me!Text88.SetFocus
Me!wc.SetFocus
Me!wc.Value = ""

On the computer I am using, this procedure works as it should. If the value entered is not in the dbo_rtemastr, it prompts the msg box, resets focus to the control and clears out the old value. However, on at least one other computer using this db, when the value entered is not in the dbo_rtemastr table it gives errors and shuts access down. It prompts the msg box, but once I hit ok it gives errors and shuts down. Are there any settings I can change on this computer for a quick fix? The computer is stripped down--nothing but windows and this db is on it. I also think it is runnin Access Runtime. Could that make a difference? I really need help with this; it's creating errors.

Many thanks as always

Jeremy
 
Hi Jeremy,
While I may not be able to help you, as I don't have any experience with the Runtime version of Access, I suggest you post the exact error messages that are displayed so that others may be able to identify the source of the problem.
All the best!
 
Jeremy,

Not sure if this will help, but Try this:

Code:
Dim iTest as Long
On Error Resume Next
iTest = DCount("[wc_code]", "dbo_rtemastr", "[wc_code]='" & Me!wc & "'")
If iTest > 0 Then
    'Do nothing
Else
    MsgBox "This is not a valid workcenter."
    Me.Text88.SetFocus
    Me.wc.SetFocus
    Me.wc.Value = ""
End If

Hap...

Access Developer [pc] Access based Add-on Solutions
Access Consultants forum
 
Thanks Guys -- Works Great
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top