If Command

N

Narayana

Dear Team,

Plz check the below details.

I want add the start date to end date ( startdate and end date is user
choice) with use of if command . But that command is not working.

Plz check the problem and give me solutions.


1-Jul-07 (Startind date) 15-Jul-07(End date)

Sunday 1-Jul-07 WEEK 0 292818
Monday 2-Jul-07 WEEK 1 76482
Tuesday 3-Jul-07 WEEK 1 149675
Wednesday 4-Jul-07 WEEK 1 111652
Thursday 5-Jul-07 WEEK 1 108571
Friday 6-Jul-07 WEEK 1 136085
Saturday 7-Jul-07 WEEK 1 184468
Sunday 8-Jul-07 WEEK 1 196619
Monday 9-Jul-07 Week 2 57226
Tuesday 10-Jul-07 Week 2 98752
Wednesday 11-Jul-07 Week 2 58309
Thursday 12-Jul-07 Week 2 112598
Friday 13-Jul-07 Week 2 124237
Saturday 14-Jul-07 Week 2 195882
Sunday 15-Jul-07 Week 2 190281
Monday 16-Jul-07 Week 3 82535
Tuesday 17-Jul-07 Week 3 93836
Wednesday 18-Jul-07 Week 3 76255
Thursday 19-Jul-07 Week 3 64672
Friday 20-Jul-07 Week 3 95130
Saturday 21-Jul-07 Week 3 210988
Sunday 22-Jul-07 Week 3 170651
Monday 23-Jul-07 Week 4 79006
Tuesday 24-Jul-07 Week 4 107080
Wednesday 25-Jul-07 Week 4 104556
Thursday 26-Jul-07 Week 4 137264
Friday 27-Jul-07 Week 4 154432
 
D

Daniel

Are you using a query or VBA recordset? If you provide your SQL string we
could help you out more.

In a query you'll need to add a criteria to the field you wish to filter
using a between statement. Something like

Between "#" & Format(Forms!Form1!txtDateFrom, "mm/dd/yyyy") & "#" And "#" &
Format(Forms!Form1!txtDateTo, "mm/dd/yyyy") & "#"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top