473,326 Members | 2,023 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Limit Combo Box results by date

283 100+
Hello all,

I am trying to make it so a combo box will only display records of the last 5 days worth of information from the drop down.

Currently I have the drop down using a query that I have creating the results on open using

Expand|Select|Wrap|Line Numbers
  1. between now() and now() - 5 'date criteria
  2.  
but im trying to filter threw about 300,000 records so its really slow! Is there a way I could rebuild this feature with VBA to greatly increase the speed??

Thanks for the help :D
Nov 24 '10 #1
1 1416
TheSmileyCoder
2,322 Expert Mod 2GB
Well a few things:
  1. Add an index to the date field in your table
  2. Changed your function to read >Date-5
Of course option 2 is counting on you not having future dates as part of your record. It basicly saves you a comparison. Also, Date will only use the date whereas Now will be both date and time.

There are more advanced options that can be used, but I would start with these 2 simple things, before startind coding solutions.
Nov 24 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Dom | last post by:
I need to run a query based on a query in Access. The second query has a number of conditions which all work well, but there is one more contition I need to set to make it run properly. the...
4
by: meganrobertson22 | last post by:
Hi Everyone- I have a question about how to add and then use the "All" selection in a combo box. I am trying to figure out how to: (1) add "All" as a selection to a combo box and then (2)...
0
by: Ronald S. Cook | last post by:
I want to query a database that will return about 1 Million records. I obviously don't want to bring this all back at once. Is there something I can do with the DataGrid to do paging but without...
4
by: seegoon | last post by:
Hi to all. I am pretty new to this stuff , so forgive me if I am asking the obvious. I am trying to extract some data from an Access database and am having some trouble. The SQL query that I am...
2
by: mmitchell_houston | last post by:
I'm working on a .NET project and I need a single query to return a result set from three related tables in Access 2003, and I'm having trouble getting the results I want. The details: ...
2
by: jwolfley | last post by:
I'm a complete noob so excuse my ignorance. I'm looking for a simple drop down list on a form that limits the choices to foldernames that relate to the customer. I have three tables named...
7
by: veliscorin | last post by:
hi experts, the topic is rather misleading but i couldn't find a better way to phrase it.. here's my scenario: Table A: Products Table B: Attributes (with a product_id to show which product it...
1
by: charliemears | last post by:
Hi there... How can I limit search results so that there is a "Next 10" and "Previous 10"? thanks for any reply....
16
by: dougmeece | last post by:
Good day everyone, I have a database with 2 main forms. The first form is used to add records to the database and contains a command button that opens the 2nd form for records searching. On...
5
by: clloyd | last post by:
I have a field that has a date format of mm/dd/yyyy and I need this date to provide a result of mm/yyyy to answer a parameter for another field. I need, in the query, for the answer to the question...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.