Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Validation Rule for Financial Year

Status
Not open for further replies.

CAFCrew

Programmer
Jan 5, 2005
58
GB
HI,

I am trying to put in a validation rule so that the table only accepts dates between Jun 01 and May 31 so that i can have a table for each financial year, however it Is either being ignored or not working.

Can someone help with the code please.

Thanks
 

Hi,

"...only accepts dates between Jun 01 and May 31"

1. Jun 01 and May 31 are NOT dates -- they are string representations of a date segment.

2. ignoring that they are not dates, the range you stated IS a full year. So how would it logically NOT accept any DATE between the two???

Most companies I have worked for (mostly large corps) have date conversion tables that EXPLICITLY relate every swingin' date to something (accounting day, accounting month, accounting quarter, accounting year, manufacturing day etc)

USE REAL DATES (year, month and day)

Skip,

[glasses] [red]Be Advised![/red] The only distinction between a bird with one wing and a bird with two, is merely...
a difference of A Pinion! [tongue]
 
Hi Skip,

Thanks for this, I am entering the dates in as proper dates, i was just giving an example of the days months i was using as it will need to be done for each financial year (going back a few!). Thanks for the idea about creating a table, but how would i link this back to the main table or form to make only records that have those dates appear?

Many thanks again for your help on this :D
 



You join that date table with your other table on claendar date and use the account date as the criteria.

Skip,

[glasses] [red]Be Advised![/red] The only distinction between a bird with one wing and a bird with two, is merely...
a difference of A Pinion! [tongue]
 
good thinking...i will give this a go...thanks very much..your a star :D

Thanks for this mate

Cafcrew
 
Hi Skip,

Sorry mate, I have joined to the date table, but it is not restricting the dates that go in. How do i set the Account date as the criteria? Is this in the validation rule? I still cant get the code right for this so any help is massively appreciated!

Thanks again
 
so that i can have a table for each financial year

This is not a normalized solution for what you are trying to do. Have you read the fundamentals document linked below?

Leslie

Anything worth doing is a lot more difficult than it's worth - Unknown Induhvidual

Essential reading for anyone working with databases: The Fundamentals of Relational Database Design
 
I haven't read the that document, but i am not sure the best way to do what i am trying to do. Have you got any suggestions as i am fairly new to access?


Thanks

Matt
 

You absolutely need to read and understand that document in order to understand what to do and what not to do.

Skip,

[glasses] [red]Be Advised![/red] The only distinction between a bird with one wing and a bird with two, is merely...
a difference of A Pinion! [tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top