aqif
Registered User.
- Local time
- Today, 23:12
- Joined
- Jul 9, 2001
- Messages
- 158
Hi All
I want to create a dynamic function which can work with any field. As an example I want to create a function calculating Tax Amount. Following calculation will be in the function
Public Function Tax_Amt()
Tax_Amt = Total_Amount - (Total_Amount * 2.5)
End Function
The problem is that every database has got different filed names. I want to create a function and then use it like
Private Sub MyField_Enter()
tax_Amt(MyField)
End Sub
And it should perform the above calculation. I want to use a function which can be used on any form with any numerical field. I dont know I m making much sense or not but this is just an example in order for me to learn. Any detailed explanation will be much appreciated.
Cheers!
Aqif
I want to create a dynamic function which can work with any field. As an example I want to create a function calculating Tax Amount. Following calculation will be in the function
Public Function Tax_Amt()
Tax_Amt = Total_Amount - (Total_Amount * 2.5)
End Function
The problem is that every database has got different filed names. I want to create a function and then use it like
Private Sub MyField_Enter()
tax_Amt(MyField)
End Sub
And it should perform the above calculation. I want to use a function which can be used on any form with any numerical field. I dont know I m making much sense or not but this is just an example in order for me to learn. Any detailed explanation will be much appreciated.
Cheers!
Aqif