Microsoft Access Forums

Go Back   Microsoft Access Forums > Access Forums > Programming

Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 03-09-2006, 11:40 PM
Novice
 
Join Date: Mar 2006
Posts: 1
cujee75
Send a message via Yahoo to cujee75
Default Problem with Code

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?
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


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


All times are GMT -8. The time now is 08:15 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.