Sub Sumbit()
Dim fac, bldg As String
Dim EffDate, SoD, EoD As Date
With ActiveSheet.Shapes("Drop Down 11").ControlFormat
'MsgBox "Item chosen = " & .List(.Value)
fac = .List(.Value)
End With
With ActiveSheet.Shapes("Drop Down 13").ControlFormat
bldg = .List(.Value)
End With
EffDate = Range("b12").Value
SoD = Range("b8").Value
EoD = Range("b10").Value
(HELP: When I hover over the .Value I get .528/.229 for the time values. When I hover over Sod I get .229 but when I hover over EoD I get the actual time 7:00PM. Only the 7:00PM exports into my Access database- I data validated SoD and EoD the same way so I do not understand why I am having this problem.
I did 12AM to 12PM for Sod and Time greater than Sod for Eod)
Dim d, rs As Object
Dim mySQL As String
Set d = CreateObject("access.application")
d.opencurrentdatabase ("\\....accdb")
d.docmd.SetWarnings False
mySQL = "insert into working_hours (effective_date, fac, bldg, start_of_day, end_of_day) values ('" & EffDate & "', '" & fac & _
"', '" & bldg & "', '" & SoD & "', '" & EoD & "');"
d.docmd.runsql mySQL
End Sub
Dim fac, bldg As String
Dim EffDate, SoD, EoD As Date
With ActiveSheet.Shapes("Drop Down 11").ControlFormat
'MsgBox "Item chosen = " & .List(.Value)
fac = .List(.Value)
End With
With ActiveSheet.Shapes("Drop Down 13").ControlFormat
bldg = .List(.Value)
End With
EffDate = Range("b12").Value
SoD = Range("b8").Value
EoD = Range("b10").Value
(HELP: When I hover over the .Value I get .528/.229 for the time values. When I hover over Sod I get .229 but when I hover over EoD I get the actual time 7:00PM. Only the 7:00PM exports into my Access database- I data validated SoD and EoD the same way so I do not understand why I am having this problem.
I did 12AM to 12PM for Sod and Time greater than Sod for Eod)
Dim d, rs As Object
Dim mySQL As String
Set d = CreateObject("access.application")
d.opencurrentdatabase ("\\....accdb")
d.docmd.SetWarnings False
mySQL = "insert into working_hours (effective_date, fac, bldg, start_of_day, end_of_day) values ('" & EffDate & "', '" & fac & _
"', '" & bldg & "', '" & SoD & "', '" & EoD & "');"
d.docmd.runsql mySQL
End Sub