thanks for the reply Ajax, let me give a little back story. i whined on here many times about some of my issues, slow network and the one location that claims they are not using wifi but complain of crashes, i know they are using wifi. so with that what i am trying to put together is some information gathering in my FE's upon loading. i have been searching for any and all methods i can find and what i have come up with is a few currentproject and environ methods that i have set to variables to be saved each time they load. then i have a timer with a loop that will basicly time how long it takes to do a specific loop and save that time. my thought is to have this loop run a few times a day just so that i will be able to compare each locations network ability and if its better or worse at different times of day. i'm sure theres better prewritten codes out there but i was trying to work it out, i am open to suggestins though.
Code:
Option Compare Database
Option Explicit
''''''''''''''''''''''''''''''''
' invisible start screen '
''''''''''''''''''''''''''''''''
Private Sub Form_Load()
Private l As Integer
Private id As String
Private dtst As Date
Private dted As Date
Private dtdif As Integer
Private curpath As String
Private mach As String
Private db As String
Private cn As String
Private ff As String
Private itr As Boolean
Private nm As String
Private sz As String
Private un As String
Private logid As String
CheckBackEnd 'relinks backend
' Me.Visible = False
dtst = Now 'start timer
id = fOSUserName
idcheck (id) 'check if user is allowed, otherwise close
l = DLookup("locationid", "operatort", "dsid='" & id & "'")
curpath = CurrentProject.FullName
db = CurrentProject.BaseConnectionString
cn = CurrentProject.connection
ff = CurrentProject.FileFormat
itr = CurrentProject.IsTrusted
nm = CurrentProject.Name
sz = Environ("COMPUTERNAME")
un = Environ("LOGONSERVER")
Me.txtdsid = id
Me.txtloc = l
Me.txtpath = curpath
Me.txtBaseConnectionString = db
Me.txtFileFormat = ff
Me.txtIsTrusted = itr
Me.txtdbName = nm
Me.txtcomputername = sz
Me.txtlogonserver = un
dted = Now 'end timer
dtdif = DateDiff("s", dtst, dted) 'get time it took
txttime = dtdif
DoCmd.ShowToolbar "ribbon", acToolbarNo
DoCmd.NavigateTo "acNavigationCategoryObjectType"
DoCmd.RunCommand acCmdWindowHide
DoCmd.ShowToolbar "ribbon", acToolbarYes
DoCmd.SelectObject acTable, , True
DoCmd.OpenForm "startf"
End Sub
this is my rough draft so far but like i said earlier i'm having trouble getting that string into my insert sql statement.
Code:
Private Sub log()
Dim strlog As String
strlog = ("INSERT INTO LogT(userid,location,fullname,baseconnectionstring,connection, " _
& "fileformat,istrusted,dbname,computername,logonserver,starttime,endtime,SignalTime) " _
& " VALUES ('" & id & "','" & l & "','" & curpath & "','" & db & "','" & cn & "', " _
& " '" & ff & "','" & itr & "','" & nm & "','" & sz & "','" & un & "','" & dtst & "','" & dted & "','" & dtdif & "') ")
CurrentDb.Execute (strlog)
Debug.Print (strlog)
logid = CurrentDb.OpenRecordset("select @@identity")(0)
Debug.Print (logid)
End Sub
its the db variable that is giving me heck. I've tried singe, double, triple quotes, ch(34),ch(39) and combinations of both. i'm out of ideals, please help