ADODB HELP

M

Mike

Can someone look at this and tell what could be wrong Please

Private Sub cmdPreview_Click()
On Error GoTo Err_cmdPreview_Click
Dim objConn As ADODB.Connection
Dim objRST As ADODB.Recordset
Dim strSQL As String
Dim strConn As String
Dim StoreIPAddress As String
Dim statusMessage As String
Dim StartDate As String
Dim EndDate As String

Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset


If Me.cboStoreIP.Value & "" = "" Then
MsgBox "Must select a store to connect to", vbOKOnly + vbCritical,
"Payroll"
Exit Sub
End If

statusMessage = SysCmd(acSysCmdSetStatus, "Please wait downloading payroll
hours from " _
& Me!cboStoreIP.Column(0) & " IPAddress " & Me!cboStoreIP.Column(1))

StartDate = Me!StartDate.Value
EndDate = Me!EndDate.Value

StoreIPAddress = Me!cboStoreIP.Value

Set objConn = CreateObject("ADODB.Connection")
Set objRST = CreateObject("ADODB.RecordSet")

strConn = "Provider=Microsoft.Jet.OLEDB.4.0;" _
& "Data Source=\\" & StoreIPAddress & "\Ilsa\Data\" _
& "Ilsa.mdb;Persist Security Info=False"

Set rs = CreateObject("ADODB.RecordSet")
Set cn = CreateObject("ADODB.Connection")

cn = "Provider=Microsoft.Jet.OLEDB.4.0;" _
& "C:\Documents and Settings\Mike Jones\Desktop\" _
& "Payroll_1.2.mdb;Persist Security Info=False"

strSQL = "SELECT Employee.NAME, Time_Clk.EMPLOYEE_ID, Time_Clk.IN_TIME, " _
& "Time_Clk.OUT_TIME, Hour([IN_TIME]-[OUT_TIME]) AS Expr1, " _
& "Minute([IN_TIME]-[OUT_TIME]) AS Expr2, [Expr2]/60 AS Expr3, " _
& "[Expr1]+[Expr3] AS Expr4, DateValue([IN_TIME]) AS Expr5, " _
& "TimeValue([IN_TIME]) AS Expr6, NOW() AS Expr7, NOW() AS Expr8,
Round([Expr4],2) AS Expr9 " _
& "FROM Employee RIGHT JOIN Time_Clk ON
Employee.EMPLOYEE_NUM=Time_Clk.EMPLOYEE_ID " _
& "WHERE (((Time_Clk.IN_TIME) Between #" & StartDate & "# " _
& "And #" & EndDate & "#+1)) " _
& "ORDER BY Time_Clk.EMPLOYEE_ID,Time_Clk.IN_TIME; "

objConn.Open (strConn)

rs.Open "tablePyrollHours", cn, adOpenKeyset, adLockOptimistic
objRST.Open strSQL, objConn, adOpenForwardOnly, adLockBatchOptimistic
objRST.MoveFirst

While Not objRST.EOF
rs.AddNew
'Debug.Print objRST.Fields("Name")
rs("EmployeeID") = objRST.Fields("EMPLOYEE_ID")
'Debug.Print Format(objRST.Fields("Expr5"), "m/d/yyyy")
'Debug.Print UCase(Format(objRST.Fields("Expr5"), "dddd"))
'Debug.Print Format(objRST.Fields("Expr6"), "h:mm")
'Debug.Print Format(objRST.Fields("OUT_TIME"), "h:mm")
'Debug.Print objRST.Fields("Expr9")
'Debug.Print Format(objRST.Fields("Expr7"), "m/d/yyyy")
'Debug.Print Format(objRST.Fields("Expr8"), "m/d/yyyy")

rs.Update
objRST.MoveNext

Wend
 
D

Douglas J. Steele

Rather than us having to go through that code line-by-line, what problem are
you encountering, and on what line of code?

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Mike said:
Can someone look at this and tell what could be wrong Please

Private Sub cmdPreview_Click()
On Error GoTo Err_cmdPreview_Click
Dim objConn As ADODB.Connection
Dim objRST As ADODB.Recordset
Dim strSQL As String
Dim strConn As String
Dim StoreIPAddress As String
Dim statusMessage As String
Dim StartDate As String
Dim EndDate As String

Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset


If Me.cboStoreIP.Value & "" = "" Then
MsgBox "Must select a store to connect to", vbOKOnly + vbCritical,
"Payroll"
Exit Sub
End If

statusMessage = SysCmd(acSysCmdSetStatus, "Please wait downloading payroll
hours from " _
& Me!cboStoreIP.Column(0) & " IPAddress " & Me!cboStoreIP.Column(1))

StartDate = Me!StartDate.Value
EndDate = Me!EndDate.Value

StoreIPAddress = Me!cboStoreIP.Value

Set objConn = CreateObject("ADODB.Connection")
Set objRST = CreateObject("ADODB.RecordSet")

strConn = "Provider=Microsoft.Jet.OLEDB.4.0;" _
& "Data Source=\\" & StoreIPAddress & "\Ilsa\Data\" _
& "Ilsa.mdb;Persist Security Info=False"

Set rs = CreateObject("ADODB.RecordSet")
Set cn = CreateObject("ADODB.Connection")

cn = "Provider=Microsoft.Jet.OLEDB.4.0;" _
& "C:\Documents and Settings\Mike Jones\Desktop\" _
& "Payroll_1.2.mdb;Persist Security Info=False"

strSQL = "SELECT Employee.NAME, Time_Clk.EMPLOYEE_ID, Time_Clk.IN_TIME, "
_
& "Time_Clk.OUT_TIME, Hour([IN_TIME]-[OUT_TIME]) AS Expr1, " _
& "Minute([IN_TIME]-[OUT_TIME]) AS Expr2, [Expr2]/60 AS Expr3, " _
& "[Expr1]+[Expr3] AS Expr4, DateValue([IN_TIME]) AS Expr5, " _
& "TimeValue([IN_TIME]) AS Expr6, NOW() AS Expr7, NOW() AS Expr8,
Round([Expr4],2) AS Expr9 " _
& "FROM Employee RIGHT JOIN Time_Clk ON
Employee.EMPLOYEE_NUM=Time_Clk.EMPLOYEE_ID " _
& "WHERE (((Time_Clk.IN_TIME) Between #" & StartDate & "# " _
& "And #" & EndDate & "#+1)) " _
& "ORDER BY Time_Clk.EMPLOYEE_ID,Time_Clk.IN_TIME; "

objConn.Open (strConn)

rs.Open "tablePyrollHours", cn, adOpenKeyset, adLockOptimistic
objRST.Open strSQL, objConn, adOpenForwardOnly, adLockBatchOptimistic
objRST.MoveFirst

While Not objRST.EOF
rs.AddNew
'Debug.Print objRST.Fields("Name")
rs("EmployeeID") = objRST.Fields("EMPLOYEE_ID")
'Debug.Print Format(objRST.Fields("Expr5"), "m/d/yyyy")
'Debug.Print UCase(Format(objRST.Fields("Expr5"), "dddd"))
'Debug.Print Format(objRST.Fields("Expr6"), "h:mm")
'Debug.Print Format(objRST.Fields("OUT_TIME"), "h:mm")
'Debug.Print objRST.Fields("Expr9")
'Debug.Print Format(objRST.Fields("Expr7"), "m/d/yyyy")
'Debug.Print Format(objRST.Fields("Expr8"), "m/d/yyyy")

rs.Update
objRST.MoveNext

Wend
 
M

Mike

The code worked and results were in the immediate window until I added these
var
to get the results togo to the table instead of Debug.Print
Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset


Douglas J. Steele said:
Rather than us having to go through that code line-by-line, what problem are
you encountering, and on what line of code?

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Mike said:
Can someone look at this and tell what could be wrong Please

Private Sub cmdPreview_Click()
On Error GoTo Err_cmdPreview_Click
Dim objConn As ADODB.Connection
Dim objRST As ADODB.Recordset
Dim strSQL As String
Dim strConn As String
Dim StoreIPAddress As String
Dim statusMessage As String
Dim StartDate As String
Dim EndDate As String

Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset


If Me.cboStoreIP.Value & "" = "" Then
MsgBox "Must select a store to connect to", vbOKOnly + vbCritical,
"Payroll"
Exit Sub
End If

statusMessage = SysCmd(acSysCmdSetStatus, "Please wait downloading payroll
hours from " _
& Me!cboStoreIP.Column(0) & " IPAddress " & Me!cboStoreIP.Column(1))

StartDate = Me!StartDate.Value
EndDate = Me!EndDate.Value

StoreIPAddress = Me!cboStoreIP.Value

Set objConn = CreateObject("ADODB.Connection")
Set objRST = CreateObject("ADODB.RecordSet")

strConn = "Provider=Microsoft.Jet.OLEDB.4.0;" _
& "Data Source=\\" & StoreIPAddress & "\Ilsa\Data\" _
& "Ilsa.mdb;Persist Security Info=False"

Set rs = CreateObject("ADODB.RecordSet")
Set cn = CreateObject("ADODB.Connection")

cn = "Provider=Microsoft.Jet.OLEDB.4.0;" _
& "C:\Documents and Settings\Mike Jones\Desktop\" _
& "Payroll_1.2.mdb;Persist Security Info=False"

strSQL = "SELECT Employee.NAME, Time_Clk.EMPLOYEE_ID, Time_Clk.IN_TIME, "
_
& "Time_Clk.OUT_TIME, Hour([IN_TIME]-[OUT_TIME]) AS Expr1, " _
& "Minute([IN_TIME]-[OUT_TIME]) AS Expr2, [Expr2]/60 AS Expr3, " _
& "[Expr1]+[Expr3] AS Expr4, DateValue([IN_TIME]) AS Expr5, " _
& "TimeValue([IN_TIME]) AS Expr6, NOW() AS Expr7, NOW() AS Expr8,
Round([Expr4],2) AS Expr9 " _
& "FROM Employee RIGHT JOIN Time_Clk ON
Employee.EMPLOYEE_NUM=Time_Clk.EMPLOYEE_ID " _
& "WHERE (((Time_Clk.IN_TIME) Between #" & StartDate & "# " _
& "And #" & EndDate & "#+1)) " _
& "ORDER BY Time_Clk.EMPLOYEE_ID,Time_Clk.IN_TIME; "

objConn.Open (strConn)

rs.Open "tablePyrollHours", cn, adOpenKeyset, adLockOptimistic
objRST.Open strSQL, objConn, adOpenForwardOnly, adLockBatchOptimistic
objRST.MoveFirst

While Not objRST.EOF
rs.AddNew
'Debug.Print objRST.Fields("Name")
rs("EmployeeID") = objRST.Fields("EMPLOYEE_ID")
'Debug.Print Format(objRST.Fields("Expr5"), "m/d/yyyy")
'Debug.Print UCase(Format(objRST.Fields("Expr5"), "dddd"))
'Debug.Print Format(objRST.Fields("Expr6"), "h:mm")
'Debug.Print Format(objRST.Fields("OUT_TIME"), "h:mm")
'Debug.Print objRST.Fields("Expr9")
'Debug.Print Format(objRST.Fields("Expr7"), "m/d/yyyy")
'Debug.Print Format(objRST.Fields("Expr8"), "m/d/yyyy")

rs.Update
objRST.MoveNext

Wend
 
S

Stefan Hoffmann

hi Mike,
The code worked and results were in the immediate window until I added these
var
to get the results togo to the table instead of Debug.Print
Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset
Then check your references, you need the "Microsoft ActiveX Data Objects
x.x Library".


mfG
--> stefan <--
 
P

Paolo

Hi mike,
Could it be just a typo in this line
rs.Open "tablePyrollHours", cn, adOpenKeyset, adLockOptimistic
'cause you wrote tablePyrollHours and perhaps your table is named
tablePayrollHours.
I got it?
Paolo


Mike said:
The code worked and results were in the immediate window until I added these
var
to get the results togo to the table instead of Debug.Print
Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset


Douglas J. Steele said:
Rather than us having to go through that code line-by-line, what problem are
you encountering, and on what line of code?

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Mike said:
Can someone look at this and tell what could be wrong Please

Private Sub cmdPreview_Click()
On Error GoTo Err_cmdPreview_Click
Dim objConn As ADODB.Connection
Dim objRST As ADODB.Recordset
Dim strSQL As String
Dim strConn As String
Dim StoreIPAddress As String
Dim statusMessage As String
Dim StartDate As String
Dim EndDate As String

Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset


If Me.cboStoreIP.Value & "" = "" Then
MsgBox "Must select a store to connect to", vbOKOnly + vbCritical,
"Payroll"
Exit Sub
End If

statusMessage = SysCmd(acSysCmdSetStatus, "Please wait downloading payroll
hours from " _
& Me!cboStoreIP.Column(0) & " IPAddress " & Me!cboStoreIP.Column(1))

StartDate = Me!StartDate.Value
EndDate = Me!EndDate.Value

StoreIPAddress = Me!cboStoreIP.Value

Set objConn = CreateObject("ADODB.Connection")
Set objRST = CreateObject("ADODB.RecordSet")

strConn = "Provider=Microsoft.Jet.OLEDB.4.0;" _
& "Data Source=\\" & StoreIPAddress & "\Ilsa\Data\" _
& "Ilsa.mdb;Persist Security Info=False"

Set rs = CreateObject("ADODB.RecordSet")
Set cn = CreateObject("ADODB.Connection")

cn = "Provider=Microsoft.Jet.OLEDB.4.0;" _
& "C:\Documents and Settings\Mike Jones\Desktop\" _
& "Payroll_1.2.mdb;Persist Security Info=False"

strSQL = "SELECT Employee.NAME, Time_Clk.EMPLOYEE_ID, Time_Clk.IN_TIME, "
_
& "Time_Clk.OUT_TIME, Hour([IN_TIME]-[OUT_TIME]) AS Expr1, " _
& "Minute([IN_TIME]-[OUT_TIME]) AS Expr2, [Expr2]/60 AS Expr3, " _
& "[Expr1]+[Expr3] AS Expr4, DateValue([IN_TIME]) AS Expr5, " _
& "TimeValue([IN_TIME]) AS Expr6, NOW() AS Expr7, NOW() AS Expr8,
Round([Expr4],2) AS Expr9 " _
& "FROM Employee RIGHT JOIN Time_Clk ON
Employee.EMPLOYEE_NUM=Time_Clk.EMPLOYEE_ID " _
& "WHERE (((Time_Clk.IN_TIME) Between #" & StartDate & "# " _
& "And #" & EndDate & "#+1)) " _
& "ORDER BY Time_Clk.EMPLOYEE_ID,Time_Clk.IN_TIME; "

objConn.Open (strConn)

rs.Open "tablePyrollHours", cn, adOpenKeyset, adLockOptimistic
objRST.Open strSQL, objConn, adOpenForwardOnly, adLockBatchOptimistic
objRST.MoveFirst

While Not objRST.EOF
rs.AddNew
'Debug.Print objRST.Fields("Name")
rs("EmployeeID") = objRST.Fields("EMPLOYEE_ID")
'Debug.Print Format(objRST.Fields("Expr5"), "m/d/yyyy")
'Debug.Print UCase(Format(objRST.Fields("Expr5"), "dddd"))
'Debug.Print Format(objRST.Fields("Expr6"), "h:mm")
'Debug.Print Format(objRST.Fields("OUT_TIME"), "h:mm")
'Debug.Print objRST.Fields("Expr9")
'Debug.Print Format(objRST.Fields("Expr7"), "m/d/yyyy")
'Debug.Print Format(objRST.Fields("Expr8"), "m/d/yyyy")

rs.Update
objRST.MoveNext

Wend
 
M

Mike

Paolo,
Good Eye but that has not solved my problem
Get Error Msg The connection cannot be used to preform this operation. It is
either
closed or invalid in this context

Paolo said:
Hi mike,
Could it be just a typo in this line
rs.Open "tablePyrollHours", cn, adOpenKeyset, adLockOptimistic
'cause you wrote tablePyrollHours and perhaps your table is named
tablePayrollHours.
I got it?
Paolo


Mike said:
The code worked and results were in the immediate window until I added these
var
to get the results togo to the table instead of Debug.Print
Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset


Douglas J. Steele said:
Rather than us having to go through that code line-by-line, what problem are
you encountering, and on what line of code?

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Can someone look at this and tell what could be wrong Please

Private Sub cmdPreview_Click()
On Error GoTo Err_cmdPreview_Click
Dim objConn As ADODB.Connection
Dim objRST As ADODB.Recordset
Dim strSQL As String
Dim strConn As String
Dim StoreIPAddress As String
Dim statusMessage As String
Dim StartDate As String
Dim EndDate As String

Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset


If Me.cboStoreIP.Value & "" = "" Then
MsgBox "Must select a store to connect to", vbOKOnly + vbCritical,
"Payroll"
Exit Sub
End If

statusMessage = SysCmd(acSysCmdSetStatus, "Please wait downloading payroll
hours from " _
& Me!cboStoreIP.Column(0) & " IPAddress " & Me!cboStoreIP.Column(1))

StartDate = Me!StartDate.Value
EndDate = Me!EndDate.Value

StoreIPAddress = Me!cboStoreIP.Value

Set objConn = CreateObject("ADODB.Connection")
Set objRST = CreateObject("ADODB.RecordSet")

strConn = "Provider=Microsoft.Jet.OLEDB.4.0;" _
& "Data Source=\\" & StoreIPAddress & "\Ilsa\Data\" _
& "Ilsa.mdb;Persist Security Info=False"

Set rs = CreateObject("ADODB.RecordSet")
Set cn = CreateObject("ADODB.Connection")

cn = "Provider=Microsoft.Jet.OLEDB.4.0;" _
& "C:\Documents and Settings\Mike Jones\Desktop\" _
& "Payroll_1.2.mdb;Persist Security Info=False"

strSQL = "SELECT Employee.NAME, Time_Clk.EMPLOYEE_ID, Time_Clk.IN_TIME, "
_
& "Time_Clk.OUT_TIME, Hour([IN_TIME]-[OUT_TIME]) AS Expr1, " _
& "Minute([IN_TIME]-[OUT_TIME]) AS Expr2, [Expr2]/60 AS Expr3, " _
& "[Expr1]+[Expr3] AS Expr4, DateValue([IN_TIME]) AS Expr5, " _
& "TimeValue([IN_TIME]) AS Expr6, NOW() AS Expr7, NOW() AS Expr8,
Round([Expr4],2) AS Expr9 " _
& "FROM Employee RIGHT JOIN Time_Clk ON
Employee.EMPLOYEE_NUM=Time_Clk.EMPLOYEE_ID " _
& "WHERE (((Time_Clk.IN_TIME) Between #" & StartDate & "# " _
& "And #" & EndDate & "#+1)) " _
& "ORDER BY Time_Clk.EMPLOYEE_ID,Time_Clk.IN_TIME; "

objConn.Open (strConn)

rs.Open "tablePyrollHours", cn, adOpenKeyset, adLockOptimistic
objRST.Open strSQL, objConn, adOpenForwardOnly, adLockBatchOptimistic
objRST.MoveFirst

While Not objRST.EOF
rs.AddNew
'Debug.Print objRST.Fields("Name")
rs("EmployeeID") = objRST.Fields("EMPLOYEE_ID")
'Debug.Print Format(objRST.Fields("Expr5"), "m/d/yyyy")
'Debug.Print UCase(Format(objRST.Fields("Expr5"), "dddd"))
'Debug.Print Format(objRST.Fields("Expr6"), "h:mm")
'Debug.Print Format(objRST.Fields("OUT_TIME"), "h:mm")
'Debug.Print objRST.Fields("Expr9")
'Debug.Print Format(objRST.Fields("Expr7"), "m/d/yyyy")
'Debug.Print Format(objRST.Fields("Expr8"), "m/d/yyyy")

rs.Update
objRST.MoveNext

Wend
 
D

Douglas J. Steele

You've declared cn to be a Connection object, and you instantiate it
correctly:

Set cn = CreateObject("ADODB.Connection")

However, you then attempt to set it to a string:

cn = "Provider=Microsoft.Jet.OLEDB.4.0;" _
& "C:\Documents and Settings\Mike Jones\Desktop\" _
& "Payroll_1.2.mdb;Persist Security Info=False"

That needs to be:

cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" _
& "C:\Documents and Settings\Mike Jones\Desktop\" _
& "Payroll_1.2.mdb;Persist Security Info=False"


--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Mike said:
The code worked and results were in the immediate window until I added
these
var
to get the results togo to the table instead of Debug.Print
Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset


Douglas J. Steele said:
Rather than us having to go through that code line-by-line, what problem
are
you encountering, and on what line of code?

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Mike said:
Can someone look at this and tell what could be wrong Please

Private Sub cmdPreview_Click()
On Error GoTo Err_cmdPreview_Click
Dim objConn As ADODB.Connection
Dim objRST As ADODB.Recordset
Dim strSQL As String
Dim strConn As String
Dim StoreIPAddress As String
Dim statusMessage As String
Dim StartDate As String
Dim EndDate As String

Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset


If Me.cboStoreIP.Value & "" = "" Then
MsgBox "Must select a store to connect to", vbOKOnly + vbCritical,
"Payroll"
Exit Sub
End If

statusMessage = SysCmd(acSysCmdSetStatus, "Please wait downloading
payroll
hours from " _
& Me!cboStoreIP.Column(0) & " IPAddress " & Me!cboStoreIP.Column(1))

StartDate = Me!StartDate.Value
EndDate = Me!EndDate.Value

StoreIPAddress = Me!cboStoreIP.Value

Set objConn = CreateObject("ADODB.Connection")
Set objRST = CreateObject("ADODB.RecordSet")

strConn = "Provider=Microsoft.Jet.OLEDB.4.0;" _
& "Data Source=\\" & StoreIPAddress & "\Ilsa\Data\" _
& "Ilsa.mdb;Persist Security Info=False"

Set rs = CreateObject("ADODB.RecordSet")
Set cn = CreateObject("ADODB.Connection")

cn = "Provider=Microsoft.Jet.OLEDB.4.0;" _
& "C:\Documents and Settings\Mike Jones\Desktop\" _
& "Payroll_1.2.mdb;Persist Security Info=False"

strSQL = "SELECT Employee.NAME, Time_Clk.EMPLOYEE_ID, Time_Clk.IN_TIME,
"
_
& "Time_Clk.OUT_TIME, Hour([IN_TIME]-[OUT_TIME]) AS Expr1, " _
& "Minute([IN_TIME]-[OUT_TIME]) AS Expr2, [Expr2]/60 AS Expr3, "
_
& "[Expr1]+[Expr3] AS Expr4, DateValue([IN_TIME]) AS Expr5, " _
& "TimeValue([IN_TIME]) AS Expr6, NOW() AS Expr7, NOW() AS
Expr8,
Round([Expr4],2) AS Expr9 " _
& "FROM Employee RIGHT JOIN Time_Clk ON
Employee.EMPLOYEE_NUM=Time_Clk.EMPLOYEE_ID " _
& "WHERE (((Time_Clk.IN_TIME) Between #" & StartDate & "# " _
& "And #" & EndDate & "#+1)) " _
& "ORDER BY Time_Clk.EMPLOYEE_ID,Time_Clk.IN_TIME; "

objConn.Open (strConn)

rs.Open "tablePyrollHours", cn, adOpenKeyset, adLockOptimistic
objRST.Open strSQL, objConn, adOpenForwardOnly, adLockBatchOptimistic
objRST.MoveFirst

While Not objRST.EOF
rs.AddNew
'Debug.Print objRST.Fields("Name")
rs("EmployeeID") = objRST.Fields("EMPLOYEE_ID")
'Debug.Print Format(objRST.Fields("Expr5"), "m/d/yyyy")
'Debug.Print UCase(Format(objRST.Fields("Expr5"), "dddd"))
'Debug.Print Format(objRST.Fields("Expr6"), "h:mm")
'Debug.Print Format(objRST.Fields("OUT_TIME"), "h:mm")
'Debug.Print objRST.Fields("Expr9")
'Debug.Print Format(objRST.Fields("Expr7"), "m/d/yyyy")
'Debug.Print Format(objRST.Fields("Expr8"), "m/d/yyyy")

rs.Update
objRST.MoveNext

Wend
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top