Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can we use a range in a table?

Status
Not open for further replies.

spidalegz

Programmer
Oct 14, 2003
11
US
My large e-commerce store needs to select products by a vehicle specific date, make, and model. How can we have a range of car years for certain products corresponding to the car itself? How can we use the make and model also? Are there certain commands that will enable us to do this?
 
Hi

Not sure I understand your question

The SQL keyword BEWTEEN seems top fit your needs, but am I missing the point?

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Actually, I still do not know how to use that command. In Access, where would I go to edit it like 90-98? How and where would I be able to use that?
 
Hi

SELECT * FROM tblMyTable WHERE datMyDate BEWTEEN #01/01/1990# AND #01/01/1998#

But since you are looking at lony years then something like:

SELECT * FROM tblMyTable WHERE Year(datMyDate) BETWEEN 1990 AND 1998

But I am still not clear what you are asking, you mention editing the query, are you trying to have a query where a user can input a date and pick out the models applicable?

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
lets just say. I am just getting back into Access. And pretend you would be teaching this to a 12 year old. I know its funny, but I need the help to get this done right. What i mean by it though, is that i want to be able to have for example: table1(make), table2(model), and table3(year) be used in combo boxes(ex. when i pick my model, only those vertain makes for that model show, then so on with the year), so i can link what they picked to my product page. I hope this isnt too much to ask. But Access is really kicking me in the butt right now. How could i do all of this?
 
Hi

See FAQ in the forms forum, there is a FAQ on how to have combo boxes, dependant on other combo boxes, hopefully this will help.



Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
OMG i am soooooooo close. Could you possibly look at my database and check out what i did wrong in my code? I would really appreciate it.
 
WHEW. I finally got it. Okay back to the range. Pretty much, I want to see if i can put a range of years (ex. 90-98) in a table. But if i try, it will not let me since a
"-" is not a number. So would i have to put years individually in the table i make? Or is there a way around this? Thanks for your help!
 
Hi

spidalez
There is so little in your file that I cannot tell what you are trying to achieve.

But It appears that youa re trying to construct a data base sof manufacturers and models (of cars). The existing year table appears to play no part in the design.

My immediate feeling is that you need to modify the model table to include a year range, since manufacturers frequently retain a model name, while making (sometimes) significant changes to the model, so for example we would have

BMW 3 Series 1990-1995
BMW 3 Series 1996-1998

and so on

It would seem to be necessary to allow an 'open ended' year range, since manufacturers do not habitually anounce the 'death' of a model range in advance.

If you care to post an EMail address I will return your file to you.


Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
um wow!!! my e-mail is spidalegz_2002@yahoo.com If you did what i think you did, then I owe you a lot. I can't wait to see what this is going to be like now.
 
I basically just need to make the database to work like this site has it
If you notice that the categories below the "select your car" section are dependent of what car type is selected. I am using ColdFusion and Im just trying to get that access database to function like the one on that site. Thanks again for your help.
 
Hi

I have a sample db to behave as per the web site you quoted.

The EMail address you quoted is not working.

If you let me have a valid EMail address, I will send it to you, my EMAil is kenneth.reayREMOVETHIS@talk21.com

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top