Hi,

use the below code. It will work.

Private Sub cmdnetser_Click()
    Dim year1 As Double
    Dim year2 As Double
    Dim yearresult   As Double
    Dim month1 As Double
    Dim month2 As Double
    Dim monthresult As Double
    Dim day1 As Double
    Dim day2 As Double
    Dim dayresult As Double

'######## for net qualfying service
lblnetqs.Visible = True
lblnetyrs.Visible = True
txtnetyrs.Visible = True
lblnetmths.Visible = True
txtnetmths.Visible = True
lblnetdays.Visible = True
txtnetdays.Visible = True
year1 = ttotyrs
year2 = txtnonyrs
month1 = ttotmths
month2 = txtnonmths
day1 = ttotdays
day2 = txtnondays
If year1 > year2 And month1 > month2 And day1 > day2 Then
yearresult = year1 - year2
monthresult = month1 - month2
dayresult = day1 - day2
End If
txtnetyrs = yearresult
txtnetmths = monthresult
txtnetdays = dayresult
End Sub
Regards,

MARIES.

On Tue, Dec 13, 2011 at 12:43 PM, Shankar Bheema <shankar.n...@gmail.com>wrote:

> Good Afternoon
>
> I am in preparation of a calculation sheet for my office purpose in ms
> access 2003.  I am enclosing the file for your reference.  In the Form,
> Right Frame containing Qualifying service i am facing a problem.  When I
> click on "Yes" for the Non Qualifying Service, I have to give the years,
> months and days.  I have written a code in "Show Net Service" command
> button for obtaining the difference in the Net yers, net months and net
> days.  But it is not displaying. Pls provide solution.
>
> --
> FORUM RULES (934+ members already BANNED for violation)
>
> 1) Use concise, accurate thread titles. Poor thread titles, like Please
> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice
> will not get quick attention or may not be answered.
>
> 2) Don't post a question in the thread of another member.
>
> 3) Don't post questions regarding breaking or bypassing any security
> measure.
>
> 4) Acknowledge the responses you receive, good or bad.
>
> 5) Cross-promotion of, or links to, forums competitive to this forum in
> signatures are prohibited.
>
> NOTE : Don't ever post personal or confidential data in a workbook. Forum
> owners and members are not responsible for any loss.
>
>
> ------------------------------------------------------------------------------------------------------
> To post to this group, send email to excel-macros@googlegroups.com
>

-- 
FORUM RULES (934+ members already BANNED for violation)

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.

2) Don't post a question in the thread of another member.

3) Don't post questions regarding breaking or bypassing any security measure.

4) Acknowledge the responses you receive, good or bad.

5)  Cross-promotion of, or links to, forums competitive to this forum in 
signatures are prohibited. 

NOTE  : Don't ever post personal or confidential data in a workbook. Forum 
owners and members are not responsible for any loss.

------------------------------------------------------------------------------------------------------
To post to this group, send email to excel-macros@googlegroups.com

Reply via email to