prabha_friend
Prabhakaran Karuppaih
- Local time
- Today, 20:28
- Joined
- Mar 22, 2009
- Messages
- 973
Hi all,
Thank you for your answers. Now the getrows is working fine at my end. Now I have a different problem at hand:
Sub Test2()
Dim myrset As Recordset
Set myrset = CurrentDb.OpenRecordset("SELECT * FROM Holidays;")
myrset.MoveLast
myrset.MoveFirst
MsgBox myrset.RecordCount
MsgBox excel.Application.WorksheetFunction.Networkdays(#8/1/2014#, #8/31/2014#, Array(#8/15/2014#, #8/29/2014#))
MsgBox excel.Application.WorksheetFunction.Networkdays(#8/1/2014#, #8/31/2014#, excel.Application.WorksheetFunction.Index(myrset.GetRows(myrset.RecordCount), 0, 1))
End Sub
Recordcount is coming fine
Manual Array is also giving the right result
But the Index method is giving the wrong value. Why?
(Holidays table is just having the values in the array only ie. #08/15/2014# and #08/29/2014#)
Thank you for your answers. Now the getrows is working fine at my end. Now I have a different problem at hand:
Sub Test2()
Dim myrset As Recordset
Set myrset = CurrentDb.OpenRecordset("SELECT * FROM Holidays;")
myrset.MoveLast
myrset.MoveFirst
MsgBox myrset.RecordCount
MsgBox excel.Application.WorksheetFunction.Networkdays(#8/1/2014#, #8/31/2014#, Array(#8/15/2014#, #8/29/2014#))
MsgBox excel.Application.WorksheetFunction.Networkdays(#8/1/2014#, #8/31/2014#, excel.Application.WorksheetFunction.Index(myrset.GetRows(myrset.RecordCount), 0, 1))
End Sub
Recordcount is coming fine
Manual Array is also giving the right result
But the Index method is giving the wrong value. Why?
(Holidays table is just having the values in the array only ie. #08/15/2014# and #08/29/2014#)