K
Kagsy
Hiya Buddies,
I live in the UK and my control panel is set at English
(UK). I have a real problem with the way Access/Windows
converts to the mm/dd/yy of the American format. Do I add
a date at the UK style and then have to force it at the
end to the correct format. I am working with a server and
a pc. Could the server be set at US format or is this the
normal way?
When I run the code below I set the curDate variable as
#1/4/2004#, it will turn it to #4/1/2004#. I am just
totally confused. My system then reads it as the 4th Jan
if I run the datediff function.
Please help me guys...
I have added the code below for help. Thanks...
Kagsy
Private Sub checkDailyIncDateXport()
Dim i As Integer
Dim startDate As Date
Dim endDate As Date
Dim curDate As Date
startDate = #1/4/2004#
endDate = Date - 1
curDate = #1/4/2004#
i = 1
Do Until curDate >= endDate
For i = 1 To 11
Call updateForm(SiteID, curDate)
Next i
curDate = curDate + 1
Loop
End Sub
Private Sub updateForm(siteName As String, selDate As Date)
Dim frm As Form
Set frm = Forms!frmDailyIncExtract
frm!cboSite = siteName
frm!txtIncDate = Format(selDate, "DD/MM/yyyy")
Set frm = Nothing
End Sub
I live in the UK and my control panel is set at English
(UK). I have a real problem with the way Access/Windows
converts to the mm/dd/yy of the American format. Do I add
a date at the UK style and then have to force it at the
end to the correct format. I am working with a server and
a pc. Could the server be set at US format or is this the
normal way?
When I run the code below I set the curDate variable as
#1/4/2004#, it will turn it to #4/1/2004#. I am just
totally confused. My system then reads it as the 4th Jan
if I run the datediff function.
Please help me guys...
I have added the code below for help. Thanks...
Kagsy
Private Sub checkDailyIncDateXport()
Dim i As Integer
Dim startDate As Date
Dim endDate As Date
Dim curDate As Date
startDate = #1/4/2004#
endDate = Date - 1
curDate = #1/4/2004#
i = 1
Do Until curDate >= endDate
For i = 1 To 11
Call updateForm(SiteID, curDate)
Next i
curDate = curDate + 1
Loop
End Sub
Private Sub updateForm(siteName As String, selDate As Date)
Dim frm As Form
Set frm = Forms!frmDailyIncExtract
frm!cboSite = siteName
frm!txtIncDate = Format(selDate, "DD/MM/yyyy")
Set frm = Nothing
End Sub