Is there a way to allow a field to contain dates or to have N/A if there is no date to be entered?
F fat controller Slightly round the bend.. Local time Today, 06:18 Joined Apr 14, 2011 Messages 758 Apr 5, 2017 #1 Is there a way to allow a field to contain dates or to have N/A if there is no date to be entered?
missinglinq AWF VIP Local time Today, 01:18 Joined Jun 20, 2003 Messages 6,423 Apr 5, 2017 #2 Only, I think, by making it a Text Field. You'd then have to use CDate() to convert the data to a Date, before using it in computations/manipulations of any kind, doing so only if the data isn't 'N/A.' Linq ;0)>
Only, I think, by making it a Text Field. You'd then have to use CDate() to convert the data to a Date, before using it in computations/manipulations of any kind, doing so only if the data isn't 'N/A.' Linq ;0)>
C CJ_London Super Moderator Staff member Local time Today, 06:18 Joined Feb 19, 2013 Messages 16,653 Apr 5, 2017 #3 you should not mix field types in a control as it can confuse access. you can use the format property for a control to display N/A if null for numbers (and the date datatype is a number) there are 4 sections separated by a semi colon positive;negative;zero;null dates can't be negative or zero so setting the property to dd/mm/yy;;;"N/A" will display N/A when null. You can add some basic colours as well [green]dd/mm/yy;;;[red]"N/A" will display valid dates in green and N/A in red Last edited: Apr 5, 2017
you should not mix field types in a control as it can confuse access. you can use the format property for a control to display N/A if null for numbers (and the date datatype is a number) there are 4 sections separated by a semi colon positive;negative;zero;null dates can't be negative or zero so setting the property to dd/mm/yy;;;"N/A" will display N/A when null. You can add some basic colours as well [green]dd/mm/yy;;;[red]"N/A" will display valid dates in green and N/A in red
F fat controller Slightly round the bend.. Local time Today, 06:18 Joined Apr 14, 2011 Messages 758 Apr 7, 2017 #4 Thank you both I have paused on this particular part at the moment (holiday mode looming!), but will refer back to this when I am at this point.
Thank you both I have paused on this particular part at the moment (holiday mode looming!), but will refer back to this when I am at this point.