UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
> Date & Time Format Only Show Year, Access 2016    
 
   
7MoonSage
post May 17 2019, 08:47 AM
Post#1



Posts: 18
Joined: 25-April 19



I'm trying to get a Model Year text box to only show year, and when I googled the issue I found "Year ( date_value )". When I place it in the default Value Box, my DB crashes. It also doesn't work in the format box.

So is there a way to make it only show the 4 Digit year?
Go to the top of the page
 
 
Start new topic
Replies
theDBguy
post May 17 2019, 11:09 AM
Post#2


Access Wiki and Forums Moderator
Posts: 76,005
Joined: 19-June 07
From: SunnySandyEggo


Hi,

Welcome to UtterAccess!
welcome2UA.gif

I agree, this doesn't makes sense. If you're using a date/time field in the table, why only show the year? Wouldn't you rather just use a number field? If it must be a date, how would users enter a valid date if you're only displaying the year? If you want to display the year out of a date field, you could use a separate textbox for it. Also, in the Format property, you would simply just use "yyyy" to display the year for a date value.

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 
7MoonSage
post May 17 2019, 02:22 PM
Post#3



Posts: 18
Joined: 25-April 19



Someone helped me figure it out now, so its no longer an issue.

George, yes, there was no error message. It went into (not responding) and only offered a close and restart option.

Bruce and Dbguy, yes I used an actual Date/Time and i was trying to get it to only show the Year for Model year of a product. I already have a separate Date and Time for manufactured date, and needed a separate for model year because the product(s) can be produced a year ahead, similar to cars.

The way I was shown to correct it was make a separate dropdown on a form and used VBA to only show the year.

Thank you all for responding though.
Go to the top of the page
 
theDBguy
post May 17 2019, 04:38 PM
Post#4


Access Wiki and Forums Moderator
Posts: 76,005
Joined: 19-June 07
From: SunnySandyEggo


Hi. Glad to hear you got it sorted out. Although, it sounds like a lot of work that maybe can be avoided. Good luck with your project.

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 

Posts in this topic



Custom Search


RSSSearch   Top   Lo-Fi    19th August 2019 - 11:59 AM