• using only month and year for field (2000)

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » using only month and year for field (2000)

    • This topic has 2 replies, 3 voices, and was last updated 20 years ago.
    Author
    Topic
    #418670

    I only want to have to record month and year in a series of fields. I formatted field to mm/yy and set up an input mask 00/00;*.

    The only problem is that if I enter 06/05 I get 05/05 and 04/06 I get 06/05? I have obviously missed something somewhere? I really don’t care if say 01 was recorded as a day each time, but I don’t want the people entering data have to worry about anything other than typing the correct month and year.

    I attach a small database with two date fields, formatted as explained above.
    Thanks
    Roberta

    Viewing 1 reply thread
    Author
    Replies
    • #943002

      You just can’t do it that way – Windows interprets the input 04/03 as 4 March in the current year (if you’re using UK date settings), i.e. as 04/03/05, and with date format mm/yy this is displayed as 03/05.
      You could use a combo box based on a table with dates such as 01/04/2005 in the first column, and text values such as April 2005 in the second column.

    • #943014

      Yeah, trying to keep just month/year is a real pain. Here are just a couple of alternatives to Hans’ suggestion. You could have 2 fields in your db, one for month and 1 for year. Or, you could use unbound textboxes for entry of month and year, then combine then (using a standard “1” for day) to create the date field in your db. You just have to figure out which is best for you situation.

    Viewing 1 reply thread
    Reply To: using only month and year for field (2000)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: