date formating and date data not compatible

K

Kendra

I have question about adding date information to a
database table. For the form, I want people to date the
form with a month and year. So I was planning to create
two pull down menus, one with months listed (January,
February...) and one with years listed (2003, 2004...).
Creating the pull down menus is no problem, except that I
am unsure of what type of data the Month and Year fields
should be. I wanted to put them date/time so that people
analyzing the forms could do queries and see all entries
for January 2004 or March 2004, but whenever I type in
January or 2004 for a field, it tells me the data is
invalid. How can I make the table work so that people can
select a month and year AND so that people analyzing the
data can do queries that recognize the dates?
 
E

Ed Robichaud

Well, one of the easier ways would be to leave your [month] and [year]
controls as text fields. On your data entry form, you could use combo
boxes, limited to look-up lists of months and years you want). When you run
your select query, use the [month] and [year] criteria to filter the records
you want. A "query by form" using those same combo boxes would be the
easiest method for users.
-Ed
 

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