In the attached DB the dates entered in the REMARKS field need to be validated, such that they should be in the format dd-mm-yy and should also not be less than todays's date. How to achieve this?
In the attached DB the dates entered in the REMARKS field need to be validated, such that they should be in the format dd-mm-yy and should also not be less than todays's date. How to achieve this?
dont let them enter data directly into your target table.
make a temp table with a date field. the form will validate the date.
then they click save, and a query updates the actual field .
Cross-Posted: https://access-programmers.co.uk/for...ghlight=kundan
Please read: https://www.excelguru.ca/content.php?184
If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
Bob Fitzpatrick
Can't open your app in v2007, so I'm guessing here...but 'REMARKS field' sounds like a Memo Field...or Long Text, in later versions of Access...and things like dates that need to be validated shouldn't be entered in these fields, but in a separate control/field.
Entries for this kind of thing should be entered in a separate Table...related to your main Table...and displayed as a Subform...with a Date field and a Remarks field for each 'remarks' entry. Then validating the Date field would be a simple matter.
The cardinal rule for Memo/Long Text fields is that they never contain material that needs to be manipulated in any way...by sorting, searching, formatting, etc.
Linq ;0)>
The problem with making anything foolproof...is that fools are so darn ingenious!
All posts/responses based on Access 2003/2007
@ Linq
I re-saved the dB in A2010 (my version) as A2007 format - hope you can open it.
You were mostly correct - the REMARKS Field Type is TEXT / Field Size = 200.
I also think the OP should be using a sub form for entering dates.
Thanks for the effort, Steve, but I still get the 'unknown format' error message.
Linq ;0)>
The problem with making anything foolproof...is that fools are so darn ingenious!
All posts/responses based on Access 2003/2007
Thanks, Steve!
In that case (even though REMARKS is simply a Text Field with a size of 200...rather than a Memo Field) the answer in #4 still applies.
Trying to separate the date portion out of a String is going t be problematic and, as noted above, really shouldn't be done, design-wise.
Does the date appear just anywhere in the String...or is it, perhaps, the first thing entered? The latter would make it somewhat easier to parse out.
Linq ;0)>
The problem with making anything foolproof...is that fools are so darn ingenious!
All posts/responses based on Access 2003/2007