P
Pat Backowski
Hi Everyone,
I'm trying to run an append query with a criteria on a date/time field based
In the form VBA, as an example:
Private Sub Form_Open(Cancel As Integer)
Dim Startdt As String
Dim Enddt As String
Dim dummy As String
Dim stSocName As String
dummy = "31/10/2007"
Startdt = dummy & " 09:00:00"
Enddt = dummy & " 09:15:59"
stDocName = "pull_test"
DoCmd.OpenQuery stDocName
MsgBox "Done with query"
End Sub
The append query appends nothing, but if I run the query by itself, and
manually enter the values 31/10/2007 09:00:00 and 31/10/2007 09:15:59 when
it prompts me for Startdt and Enddt, I get my data.
Where am I going wrong?
Many thanks in advance for your kind assistance,
Pat.
I'm trying to run an append query with a criteria on a date/time field based
=[Forms]![oneoclock]![Startdt] And <=[Forms]![oneoclock]![Enddt]
In the form VBA, as an example:
Private Sub Form_Open(Cancel As Integer)
Dim Startdt As String
Dim Enddt As String
Dim dummy As String
Dim stSocName As String
dummy = "31/10/2007"
Startdt = dummy & " 09:00:00"
Enddt = dummy & " 09:15:59"
stDocName = "pull_test"
DoCmd.OpenQuery stDocName
MsgBox "Done with query"
End Sub
The append query appends nothing, but if I run the query by itself, and
manually enter the values 31/10/2007 09:00:00 and 31/10/2007 09:15:59 when
it prompts me for Startdt and Enddt, I get my data.
Where am I going wrong?
Many thanks in advance for your kind assistance,
Pat.