troubleshooting Question

Module Programming

Avatar of kaysoo
kaysooFlag for Malaysia asked on
Microsoft Access
3 Comments1 Solution74 ViewsLast Modified:
Hi expert,

I am using Access 2003, I used the following IIF function in query to generate data of growing stage of certain animals, can anyone help me to create a module instead of using query?
I hv to use module function due to a lengthy possibility of the result outcome and query has limited text input allowed. The following is the max allowed in query column.
I need the full module programming code thx.

[DaysOfLife] is calculated from Today's Date minus individual D.O.B. in my existing query

GrowingStage: IIf([DaysOfLife] Between 1 And 15,"1-15 Days",IIf([DaysOfLife] Between 16 And 30,"16-30 Days",IIf([DaysOfLife] Between 31 And 45,"31-45 Days",IIf([DaysOfLife] Between 46 And 60,"46-60 Days",IIf([DaysOfLife] Between 61 And 80,"7cm",IIf([DaysOfLife] Between 81 And 100,"13cm",IIf([DaysOfLife] Between 101 And 150,"17cm",IIf([DaysOfLife] Between 151 And 200,"26cm",IIf([DaysOfLife] Between 201 And 250,"33cm",IIf([DaysOfLife] Between 251 And 300,"42cm",IIf([DaysOfLife] Between 301 And 350,"48cm",IIf([DaysOfLife] Between 351 And 750,"Adult",IIf([DaysOfLife]>750,"Maturity")))))))))))))

Please help to show how to create a Public Function in Module thx.
ASKER CERTIFIED SOLUTION
als315

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros