Need faster way to enter range of info

P

Pamela

I need my db to have (and then be able to sort by) all of the car Makes and
Models by Year since about 1970. I have a table w/ ID, Year, Make & Model
fields and now created a form just for entering them but am having to enter
Honda Accord (granted, I'm using combo boxes for this) 30 times to encompass
all of the years that veh has been manufactured. Anyone have an idea for a
faster way to enter a range of dates that I can then use in cascading combo
boxes? Thanks so much!
 
P

Pamela

Thanks, this sounds great, but I don't know how to use it...does this go into
the code or into a query? Do I need to add two new fields to the table --
StartYear & EndYear? Thanks for your continued help!!

KARL DEWEY said:
Use criteria Between CVDate([Enter start]) And CVDate([Enter end])
--
KARL DEWEY
Build a little - Test a little


Pamela said:
I need my db to have (and then be able to sort by) all of the car Makes and
Models by Year since about 1970. I have a table w/ ID, Year, Make & Model
fields and now created a form just for entering them but am having to enter
Honda Accord (granted, I'm using combo boxes for this) 30 times to encompass
all of the years that veh has been manufactured. Anyone have an idea for a
faster way to enter a range of dates that I can then use in cascading combo
boxes? Thanks so much!
 
K

KARL DEWEY

Let me start over. I was thinking you were using dates, not years.

In your form use two text boxes labeled Start and End. This is where you
enter the range of dates.
In your query design view under the Year field use this criteria --
Between [Forms]![YourFormName]![YourStartTextBox] And
[Forms]![YourFormName]![YourEndTextBox]

--
KARL DEWEY
Build a little - Test a little


Pamela said:
Thanks, this sounds great, but I don't know how to use it...does this go into
the code or into a query? Do I need to add two new fields to the table --
StartYear & EndYear? Thanks for your continued help!!

KARL DEWEY said:
Use criteria Between CVDate([Enter start]) And CVDate([Enter end])
--
KARL DEWEY
Build a little - Test a little


Pamela said:
I need my db to have (and then be able to sort by) all of the car Makes and
Models by Year since about 1970. I have a table w/ ID, Year, Make & Model
fields and now created a form just for entering them but am having to enter
Honda Accord (granted, I'm using combo boxes for this) 30 times to encompass
all of the years that veh has been manufactured. Anyone have an idea for a
faster way to enter a range of dates that I can then use in cascading combo
boxes? Thanks so much!
 
P

Pamela

Thanks again for this, and I've followed your advice as far as adding the 2
text boxes but got lost on where the query comes in. First off, should
those text boxes be bound to my table? As for the query, are you suggesting
that I create a query to base this form on or is that for when I want to use
the info later? I really appreciate your continued help...

KARL DEWEY said:
Let me start over. I was thinking you were using dates, not years.

In your form use two text boxes labeled Start and End. This is where you
enter the range of dates.
In your query design view under the Year field use this criteria --
Between [Forms]![YourFormName]![YourStartTextBox] And
[Forms]![YourFormName]![YourEndTextBox]

--
KARL DEWEY
Build a little - Test a little


Pamela said:
Thanks, this sounds great, but I don't know how to use it...does this go into
the code or into a query? Do I need to add two new fields to the table --
StartYear & EndYear? Thanks for your continued help!!

KARL DEWEY said:
Use criteria Between CVDate([Enter start]) And CVDate([Enter end])
--
KARL DEWEY
Build a little - Test a little


:

I need my db to have (and then be able to sort by) all of the car Makes and
Models by Year since about 1970. I have a table w/ ID, Year, Make & Model
fields and now created a form just for entering them but am having to enter
Honda Accord (granted, I'm using combo boxes for this) 30 times to encompass
all of the years that veh has been manufactured. Anyone have an idea for a
faster way to enter a range of dates that I can then use in cascading combo
boxes? Thanks so much!
 
K

KARL DEWEY

Text boxes not be bound to your table.
Yes, create a query to base this form on or you might use a separate form
for parameters form results display.
--
KARL DEWEY
Build a little - Test a little


Pamela said:
Thanks again for this, and I've followed your advice as far as adding the 2
text boxes but got lost on where the query comes in. First off, should
those text boxes be bound to my table? As for the query, are you suggesting
that I create a query to base this form on or is that for when I want to use
the info later? I really appreciate your continued help...

KARL DEWEY said:
Let me start over. I was thinking you were using dates, not years.

In your form use two text boxes labeled Start and End. This is where you
enter the range of dates.
In your query design view under the Year field use this criteria --
Between [Forms]![YourFormName]![YourStartTextBox] And
[Forms]![YourFormName]![YourEndTextBox]

--
KARL DEWEY
Build a little - Test a little


Pamela said:
Thanks, this sounds great, but I don't know how to use it...does this go into
the code or into a query? Do I need to add two new fields to the table --
StartYear & EndYear? Thanks for your continued help!!

:

Use criteria Between CVDate([Enter start]) And CVDate([Enter end])
--
KARL DEWEY
Build a little - Test a little


:

I need my db to have (and then be able to sort by) all of the car Makes and
Models by Year since about 1970. I have a table w/ ID, Year, Make & Model
fields and now created a form just for entering them but am having to enter
Honda Accord (granted, I'm using combo boxes for this) 30 times to encompass
all of the years that veh has been manufactured. Anyone have an idea for a
faster way to enter a range of dates that I can then use in cascading combo
boxes? Thanks so much!
 
K

KARL DEWEY

Just remember that the form with the input textboxes must remain open when
you run the query.
--
KARL DEWEY
Build a little - Test a little


Pamela said:
Thanks again for this, and I've followed your advice as far as adding the 2
text boxes but got lost on where the query comes in. First off, should
those text boxes be bound to my table? As for the query, are you suggesting
that I create a query to base this form on or is that for when I want to use
the info later? I really appreciate your continued help...

KARL DEWEY said:
Let me start over. I was thinking you were using dates, not years.

In your form use two text boxes labeled Start and End. This is where you
enter the range of dates.
In your query design view under the Year field use this criteria --
Between [Forms]![YourFormName]![YourStartTextBox] And
[Forms]![YourFormName]![YourEndTextBox]

--
KARL DEWEY
Build a little - Test a little


Pamela said:
Thanks, this sounds great, but I don't know how to use it...does this go into
the code or into a query? Do I need to add two new fields to the table --
StartYear & EndYear? Thanks for your continued help!!

:

Use criteria Between CVDate([Enter start]) And CVDate([Enter end])
--
KARL DEWEY
Build a little - Test a little


:

I need my db to have (and then be able to sort by) all of the car Makes and
Models by Year since about 1970. I have a table w/ ID, Year, Make & Model
fields and now created a form just for entering them but am having to enter
Honda Accord (granted, I'm using combo boxes for this) 30 times to encompass
all of the years that veh has been manufactured. Anyone have an idea for a
faster way to enter a range of dates that I can then use in cascading combo
boxes? Thanks so much!
 
J

John W. Vinson

I need my db to have (and then be able to sort by) all of the car Makes and
Models by Year since about 1970. I have a table w/ ID, Year, Make & Model
fields and now created a form just for entering them but am having to enter
Honda Accord (granted, I'm using combo boxes for this) 30 times to encompass
all of the years that veh has been manufactured. Anyone have an idea for a
faster way to enter a range of dates that I can then use in cascading combo
boxes? Thanks so much!

Do you have a *table* of Makes, with records for (e.g.) Honda, Ford, BMW, Yugo
etc.? Do you have a table related one-to-many with this table for Models? If
not... maybe you should!

This would let you enter a manufacturer... once, in a main form; enter a
model... once, in a subform; and then in a sub-subform, enter each year that
model was made (with any needed information specific to that model year).

As it is, you could consider having a table ModelYears with a single field
ModelYear (don't use the reserved word Year as a fieldname) filled with years
from 1895 through 2008 (or whatever range you need), and run an APpend query
to fill in a range of years, e.g.

INSERT INTO mytable (Make, Model, ModelYear)
SELECT "Ford", "Edsel", ModelYear
FROM ModelYears
WHERE ModelYear BETWEEN 1957 AND 1960;
 

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