cancel
Showing results for 
Search instead for 
Did you mean: 

Macros

Former Member
0 Kudos

Hi all,

Iam using a sql statement to retrieve records for a particular period in macros.

My sql statement is as follows:

sSql = sSql & " WHERE (FKDAT Like '" & Sheet1.Cells(3, 2) & "%') " & vbCrLf 'Invoice Date

The from-date is in cell(3, 2) and the to-date In (3, 3). I able to use only one date.

Please help to me to get the correct statement,

Raj.

Message was edited by:

Rajesh Kumar

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member185954
Active Contributor
0 Kudos

Hi Rajesh,

The macro should be :

where FKDAT >= Sheet1.Cells(3,2) AND FKDAT <=Sheet1.Cells(3,3)

i am ignorning the formatting assuming that you know it

Regards,

siddhesh