![]() |
|
|
#1
|
|||
|
|||
|
I have 7 fields:
1. Monthly allowance 2. maintenance cost 3. road tax 4. proposed effective date 5. calc - to calculate prorated amount for monthly allowance 6. calc2 - to calculate prorated amount fr maintenance cost 7. calc3 - to calculated prorated amount fr road tax I have created code which calculated prorated amount based on this formula: ((Date - proposed effective date)/365) * monthly allowance or maintenance cost or road tax my code is : Private Sub Text41_Change() (text41 = proposed effective date) End Sub Private Sub Text41_LostFocus() If (Date - Me.Text41.Value) / 365 < 1 Then Me.calc.Value = ((Date - Me.Text41.Value) / 365) * Me.Text31.Value End If End Sub When I created another code with the same coding but different parameter. e.g Me.Text31.Value change to Me.text37.value, error appeared saying that expression created produced ambigious name. how to solve this problem? as the coding refer to the same proposed effective, can I still use Text41_change () for the other two code? |
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Code Trouble? | briancb2004 | Access | 0 | 10-08-2008 02:47 PM |
| Need help with code | hoenheim | Programming | 9 | 09-11-2008 02:19 PM |
| Need Help Getting to Code | Snuffles | Programming | 8 | 04-22-2008 03:25 PM |
| Navigation Code | henryclay | Forms | 2 | 11-15-2006 06:48 AM |