Drew Wutka
DWUTKA at marlow.com
Fri Jul 11 13:56:10 CDT 2003
Why is this in the code twice?
'strSQLInsert = strSQLInsert & fcnOSUserName'
You are saying ""="" & Username
Why?
just replace that string with fcnOSUserName, see if that makes a difference.
Drew
-----Original Message-----
From: Nancy Lytle [mailto:nancy.lytle at auatac.com]
Sent: Friday, July 11, 2003 10:34 AM
To: accessd at databaseadvisors.com
Subject: [AccessD] Function User Log error
I guess it would help if I used a subject line, wouldn't it:>
I use the function below to log users into and out of a database. The
database is split with the BE on a server and using AutoFEUpdater to place
and update the Front end on the users C:\Drive.
However, when I deployed this database yesterday, something strange
happened,
some users get an error message saying an updateable query must be used, and
others do not. For those with the error message, the main menu form does
not
open or is hidden, but they can open it from a toolbar I set up, then go on
about their business.
I have narrowed the problem area to the function below.
All the machines have the same configurations, and references(?), only
difference is that there are 2 sides to the LAN, an FAA side and a NG side.
But we can all get to and have permissions to the proper folders (obvious
since everyone can actually open the database and work)
Any ideas welcome,
TIA
Nancy Lytle
CODE:
Option Compare Database
Option Explicit
Public bolUSERLOG As Boolean 'enter exit flag
Public Function fcnLogUser()
Call fcnOSUserName
Call fcnUserGroup
Dim strSQLInsert As String
MsgBox "User entering/exiting"
'DoCmd.SetWarnings False
If bolUSERLOG = False Then
strSQLInsert = "insert into tblUserLog(UserName, UserGroup, UserEnter)
values
('"
strSQLInsert = strSQLInsert & fcnOSUserName & "', '" & fcnUserGroup & "', #"
& Now() & "#)"
MsgBox strSQLInsert
Else
strSQLInsert = "insert into tblUserLog(UserName, UserGroup, UserExit) values
('"
strSQLInsert = strSQLInsert & fcnOSUserName & "', '" & fcnUserGroup & "', #"
& Now() & "#)"
MsgBox strSQLInsert
End If
DoCmd.RunSQL strSQLInsert
'DoCmd.SetWarnings True
End Function
--
Nancy Lytle
EIS
nancy.lytle at auatac.com
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com