date time picker

C

chriske911

Can I use a date time picker control to display months only?
this in access 2007

I don't mind access storing the full date but I don't want the user to
have to select a date when they only need to fill in year and month
right now it is a text field with following format yyyy/mm

thnx
 
M

Mark Andrews

I would think the normal usage would be a dropdown displaying the months
they could select.

I usually have a lookup table that stores the months.

Example:
1/1/2009
2/1/2009
3/1/2009
....

In the dropdown just format the display of the date to month and year, but
store it as a date (I use the first day of the month).

I don't think the date picker will work,
Mark
RPT Software
http://www.rptsoftware.com
 
C

chriske911

chriske911 brought next idea :
Can I use a date time picker control to display months only?
this in access 2007
I don't mind access storing the full date but I don't want the user to have
to select a date when they only need to fill in year and month
right now it is a text field with following format yyyy/mm

would it be workable to set the control to the first day of the current
month and year?
and change the value to the first day of the selected month if the user
changes/updates this default value?

an other table holds the exchange rate for each month so I can convert
invoices based on their accounting month, there fore I have to make
sure the dates in both tables is set to the same value

or is there another way to link an invoice date to within a date range
in another table?

something like:

"give me the exchange rate of the month which is valid for this invoice
date"

thnx
 
C

chriske911

I would think the normal usage would be a dropdown displaying the months they
could select.
I usually have a lookup table that stores the months.

In the dropdown just format the display of the date to month and year, but
store it as a date (I use the first day of the month).
I don't think the date picker will work,
Mark
RPT Software
http://www.rptsoftware.com

I just replied the same suggestion myself ;-)

another thought is to create a third table which holds dates in the
format I like and let the users select them with the use of a listbox

the third table binds the other 2 tables

whaddayouthink?
 
M

Mark Andrews

If you are consistent with using the first day of the month for everywhere a
user selects a (month/year) you should be ok.

I think you only need one lookup table of dates (if you want to restrict the
user to only selecting certain (month/year) values.

I'm not sure I understand what this third table concept is? You can always
use the Format() function to display the date values in any way you want to
the user.

If you let the user edit the months lookup table, they can control which
months are available.

Always store the value as a date, it will benefit you in the long run (even
though they are selecting a month/year).

Mark
 

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