VBA Help

jonamua1971

Registered User.
Local time
Yesterday, 19:08
Joined
Mar 3, 2007
Messages
97
hi all,
i have a running database and after i met the users , they all expressed the need for to me change one thing in the system.
i have a form built on a query which get its data from two tables.
we charge our tenant rent . the rent figure is based on one's income.
what i would to accomplish is as follows.i would like for the rent field to automatically fill in the rent amount based on the tenent id then what the users will do is simply add the rent paid. right know the users have to enter the rent paid and the renter charge. its just to much work.
how will the vba look like??
any help will highly apprecited
 
we charge our tenant rent . the rent figure is based on one's income.

Based on this - here is one way to accomplish your goal (if you do not want to historically track the different rates of rent) ...

If the rent figures is a percentage, then on the AfterUpdate event of the Tenant's income you could probably use:

Code:
Me.txtControlNameofRent = Me.txtControlNameofIncome * x
where x is the percentage rate.

-dK
 
thanks DK
let try what you have said. by the way DK you are the one that helped me with the ealier problem i had. it worked using conditional formatting.
thanks
 
Re: VBA /Automatically populating a field

DK
I received help from you and i cannot forget you;
well, maybe i did not ask my question correctly.
i tried the codes above but did not work. when i click on tenant id to add a new entry they all show zeros.
Explanation
TABLE A: Rent Amount entries
TABLE B: AMT received
TABLE C: Tenant id , names
TABLE A.We use it to enter all rent amounts for the tenent(in form format)
Table b. we use it to enter all amt recived from the tenants(in form format)
Table c: has all the names
Query: has fields from TableA,B,C
Then the query is used to make a form.
what we want is as follow, the tenant amt should automically show when i click the tenant id. but what is happening now, i have to enter the tenant amount when it was entered in the rent amount table. that kind of doublication
everything is working fine except that field.any input will be highly apprecited.
 
Ah yes, I remember now =]. I think I understand ...

If the rent figures is a percentage, then on the OnClick event of the Tenant's ID you could try:

Code:
Me.txtControlNameofRent = Me.txtControlNameofIncome * x
where x is the percentage rate.

I will probably need to see the database again if I missed what you want.

-dk
 

Users who are viewing this thread

Back
Top Bottom