I have been developing an FE/BE database that will run on multiple machines at one time to log tasks during the work day. My program has finally come around to a point where I need to begin testing it but as of yesterday the second machine I put I put it on errored. The database came up alright but when I tried to log a task (which is done, in part, with an SQL statement) it gave me an error stating;
"Function is not available in expressions in query expression '(((Sample_TM_Table_1.Date_In)=Date()) AND ((Sample_TM_Table_1.User)=CurrentUser()) AND ((Sample_TM_Table_1.Time_In) Is Not Null AND ((Sample_TM_Table_1.Time_Out) Is Null)))'.
Is there a module that this particular machine could be missing or an .ocx file? I only ask about the .ocx file because I know that is causing a problem with one of the ActiveX Controls on that same machine. MSCOMCT2.OCX and/or MSCOMCTL.OCX are the.ocx files that are not on that machine that were calling for errors on a previous database that utilized the Date/Time Picker. Could this file (or another) possibly be the reason the SQL statement is not running? The SQL statement is....
Private Sub Form_BeforeUpdate(Cancel As Integer)
Dim str_SQL1 As String
str_SQL1 = "UPDATE Sample_TM_Table_1 SET Time_Out = #" & Now() & "# WHERE IsNull(Time_Out) AND (Time_In) > 0 AND User = '" & Me.User & "';"
DoCmd.SetWarnings False
DoCmd.RunSQL str_SQL1
End Sub
The SQL statement was built off of suggestions from this forum and I really do not know much about SQL statements in general. I understand the basis of them but have a very shallow knowledge of what makes them work and what they are reliant upon so I am not real sure where to start in troubleshooting this particular problem. Any ideas?
Thansk in advance!!!
"Function is not available in expressions in query expression '(((Sample_TM_Table_1.Date_In)=Date()) AND ((Sample_TM_Table_1.User)=CurrentUser()) AND ((Sample_TM_Table_1.Time_In) Is Not Null AND ((Sample_TM_Table_1.Time_Out) Is Null)))'.
Is there a module that this particular machine could be missing or an .ocx file? I only ask about the .ocx file because I know that is causing a problem with one of the ActiveX Controls on that same machine. MSCOMCT2.OCX and/or MSCOMCTL.OCX are the.ocx files that are not on that machine that were calling for errors on a previous database that utilized the Date/Time Picker. Could this file (or another) possibly be the reason the SQL statement is not running? The SQL statement is....
Private Sub Form_BeforeUpdate(Cancel As Integer)
Dim str_SQL1 As String
str_SQL1 = "UPDATE Sample_TM_Table_1 SET Time_Out = #" & Now() & "# WHERE IsNull(Time_Out) AND (Time_In) > 0 AND User = '" & Me.User & "';"
DoCmd.SetWarnings False
DoCmd.RunSQL str_SQL1
End Sub
The SQL statement was built off of suggestions from this forum and I really do not know much about SQL statements in general. I understand the basis of them but have a very shallow knowledge of what makes them work and what they are reliant upon so I am not real sure where to start in troubleshooting this particular problem. Any ideas?
Thansk in advance!!!