1

Topic: Request in basis by date at sight Excel

All greetings!
Question such... On sheet Excel in Cells (1, 1) there is a digit. For example, 4.

m = Sheets ("List1").Cells (1, 1).Value

In basis there are the conditional dates with different days, but with the necessary number of month with "mask" of 4/1/0000 - type, so...
How to write request, to draw out the conditional values r under number 4?

SQLr = "SELECT r FROM RRR where date = m"

I can not understand how to "equate" 4 to xx.04.xxxx and on the basis of it to write request.
Prompt, please.

2

Re: Request in basis by date at sight Excel

Thanks, took additional )
Took therefrom the request form... But... All the same... With request I can not understand....
There is basis Access rrr
There there are two columns
The first date in a format of 2/1/2018
The second r with the text
I want to understand how to pull out the text by date

Sub ter ()
Dim tbl As Recordset
Dim dbs As DAO.Database
Set dbs = OpenDatabase ("G:\3\A.accdb")
m = Sheets ("List2").Cells (1, 2).Value ' Normal numeral value, type, 1,2,3... Conditionally multiple to month
SQLr1 = "SELECT * FROM rrr WHERE (((rrr. Date) =#" AND Format (m, "mm\/dd\/yy hh\:mm\:ss") AND "#));"'
Set tbl = dbs. OpenRecordset (SQLr1)
Sheets ("List1").Select
Cells (8, 1).CopyFromRecordset tbl
tbl. Close
Set tbl = Nothing
dbs. Close
Set dbs = Nothing
End Sub

3

Re: Request in basis by date at sight Excel

If you year (that hardly), does not interest:
...WHERE Month (rrr. [Date]) = 2
But more correctly and faster, if a field with date the indexed:
...WHERE rrr. [Date] Between #02/01/2018# And #02/28/2018#
. Note that the field name "Date" is taken in sq. brackets. Not the best name for a field, since this reserved keyword.
. You littered a forum with set of branches with the same questions. It in vain. It was necessary to conduct all debate in one branch.

4

Re: Request in basis by date at sight Excel

Thanks big!
That is necessary, even in two variants
It is a little  the request
Thanks!)
And where to me still to ask...
Better with live people to communicate