Coding Functionality

V

Viv_500

Hi,

I am creating a membership database and would like to know if it is
possible for an applicants details to move to another table within the
same database once they have been accepted (i.e. from Applicant to Full
Member)and then for more details to be addes about the member?

On one form I have the space to enter in the date a payment was
received. Is there anyway of making this automatic so the users cannot
alter the date they entered the payment?

Is it possible to write code that calculates when members reach the age
of 65 (from the current date)using their DOB?

Any suggestions much appreciated (my Access skills have gone a bit
rusty!)!

Thanks, Viv :)
 
K

Kevin

Viv,

I would not move the members information, just put a
memberType field in the table. The default would
be "Applicant" for the field and would be changed
later "Member" when they reach member status.

As far as calculating when they would be 65, one of the
MVPs could probably give you a formula. I know Access has
Month, Day, and Year commands that extract the parts of
the date. You could do something like the following (I
have not tested this):

dim currentAge as integer
dim curYear as variant

dim memdob as date
dim dobMonth as variant
dim dobYear
dim dobDay

dim yearAt65 as integer
dim bday65 as variant

memdob=Me!memdob ' this assumes you have a field on your
form called memdob

curYear=Year(now())

dobYear=year(memdob)

currentAge=curYear-dobYear 'not exact age because birthday
may not have yet occured.

yearAt65=curYear+(65-currentAge)

dobMonth=Month(memdob)
dobDay=day(memdob)

bday65=dobMonth&"/"&dobDay&"/"&yearAt65

I believe, but am not sure how, that you can force this
into a specific date format, but I am not sure of the
commands, etc.

Hope this helps!

Kevin
-----Original Message-----
Hi,

I am creating a membership database and would like to know if it is
possible for an applicants details to move to another table within the
same database once they have been accepted (i.e. from Applicant to Full
Member)and then for more details to be addes about the member?

On one form I have the space to enter in the date a payment was
received. Is there anyway of making this automatic so the users cannot
alter the date they entered the payment?

Is it possible to write code that calculates when members reach the age
of 65 (from the current date)using their DOB?

Any suggestions much appreciated (my Access skills have gone a bit
rusty!)!

Thanks, Viv :)



------------------------------------------------
 
M

Marshall Barton

Kevin said:
Viv,

I would not move the members information, just put a
memberType field in the table. The default would
be "Applicant" for the field and would be changed
later "Member" when they reach member status.

Good advice, Kevin.

As far as calculating when they would be 65, one of the
MVPs could probably give you a formula. I know Access has
Month, Day, and Year commands that extract the parts of
the date. You could do something like the following (I
have not tested this):
[snip]

There's a popular function to calculate age at:
http://www.mvps.org/access/datetime/date0001.htm


As for preventing a date from being changed, I think the
date text box should be locked for any record that already
has a date value:

Using the form's Current event
Me.thetextbox.Locked = Not IsNull(Me.thetextbox)
--
Marsh
MVP [MS Access]


 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top