G
Guest
Hi everyone,
Access 2003, Windows XP
I have a form to open a form filtered by range date and city name text with
the following onclick command button procedure :
Private Sub Comando6_Click()
Dim strWhere As String 'condição
Dim strForm As String
Dim strLocalidade As String
Dim strData As String
Const conDateFormat = "\#mm\/dd\/yyyy\#"
strForm = "Consulta_por_localidade"
strLocalidade = "LOCALIDADE"
strData = "ENTR_DIA_AGENDADO"
strWhere = ("localidade = '" & Me!LOCALIDADE & "'") And (strData & " Between
" & Format(Me.txtstartdate, conDateFormat) _
& " And " & Format(Me.txtenddate, conDateFormat))
DoCmd.OpenForm strForm, , , strWhere
End Sub
Access 2003, Windows XP
I have a form to open a form filtered by range date and city name text with
the following onclick command button procedure :
Private Sub Comando6_Click()
Dim strWhere As String 'condição
Dim strForm As String
Dim strLocalidade As String
Dim strData As String
Const conDateFormat = "\#mm\/dd\/yyyy\#"
strForm = "Consulta_por_localidade"
strLocalidade = "LOCALIDADE"
strData = "ENTR_DIA_AGENDADO"
strWhere = ("localidade = '" & Me!LOCALIDADE & "'") And (strData & " Between
" & Format(Me.txtstartdate, conDateFormat) _
& " And " & Format(Me.txtenddate, conDateFormat))
DoCmd.OpenForm strForm, , , strWhere
End Sub