Start date and End date

  • Thread starter Thread starter DucateAssignment via AccessMonster.com
  • Start date Start date
D

DucateAssignment via AccessMonster.com

Hello

I have a simple database that has information entered by date. I have a form
that I can lookup information using an unbound combo box. Can someone please
tell me how to place a start date and end date on the form so that only the
dates selected will be printed?


Skippp
 
Hello

I have a simple database that has information entered by date. I have a form
that I can lookup information using an unbound combo box. Can someone please
tell me how to place a start date and end date on the form so that only the
dates selected will be printed?


Skippp

You can use two textboxes on the form txtStart and txtEnd, and use a search
criterion
= Forms!YourFormName!txtStart AND < DateAdd("d", 1, Forms!YourFormName!txtEnd)

on the date field. The DateAdd bit ensures that table records with a time
portion are retrieved on the last day of the range.

John W. Vinson [MVP]
 
John said:
[quoted text clipped - 4 lines]

You can use two textboxes on the form txtStart and txtEnd, and use a search
criterion
= Forms!YourFormName!txtStart AND < DateAdd("d", 1, Forms!YourFormName!txtEnd)

on the date field. The DateAdd bit ensures that table records with a time
portion are retrieved on the last day of the range.

John W. Vinson [MVP]

I have the two boxes Start Date and End Date. I do not know where to install
the search criterion, can you advise me.

Thanks
 
DucateAssignment said:
[quoted text clipped - 11 lines]
John W. Vinson [MVP]

I have the two boxes Start Date and End Date. I do not know where to install
the search criterion, can you advise me.

Thanks


Hey John

I realized what you were saying about the search criteria. I placed it in
the query and it works, however I need to utilize the search after an ID
number has been selected with the combo box. This will allow me to choose an
ID and then select a range of dates for that ID or set of records
 
I realized what you were saying about the search criteria. I placed it in
the query and it works, however I need to utilize the search after an ID
number has been selected with the combo box. This will allow me to choose an
ID and then select a range of dates for that ID or set of records

So? You have one criterion on the ID field - =Forms!yourformname!comboboxname
as the criterion - and another criterion on the date field. Queries run "all
at once" - you don't need to apply the criteria sequentially, just so they're
all included.

John W. Vinson [MVP]
 

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

Back
Top