Showing posts with label temperature converter in ms access. Show all posts
Showing posts with label temperature converter in ms access. Show all posts

Saturday, January 6, 2018

Temperature Converter in Microsoft Access

I created a program using Microsoft Access 2010 I called this program Temperature Converter it has two options the first one is Fahrenheit To Celsius and the other one is Celsius To Fahrenheit. It will ask the user to give temperature value and then our program will convert the given value. I hope you will find my work useful.

I am currently accepting programming and web development work kindly contact me in the following email address for further details. Thank you.

My email address are the following jakerpomperada@gmail.com and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental is (034) 4335675.






Sample Program Output


Program Listing

' Temperature Converter in Microsoft Access 2010
' Written By Mr. Jake R. Pomperada, MAED-IT
' January 6, 2018  Saturday
' jakerpomperada@yahoo.com and jakerpomperada@gmail.com
' Bacolod City, Negros Occidental Philippines

Option Compare Database

Private Sub Command17_Click()
Me.Option2.Value = ""
Me.Option6.Value = ""
Me.Option2.Enabled = True
Me.Option6.Enabled = True
Me.Label18.Caption = ""
Me.txt_temp = ""
Me.txt_temp.SetFocus
End Sub


Private Sub Command19_Click()
Dim Sure As Integer

Sure = MsgBox("Are you sure?", vbOKCancel)
If Sure = 1 Then
DoCmd.Quit
Else
 DoCmd.OpenForm "temp"
 Me.txt_temp.SetFocus
End If
End Sub

Private Sub Command8_Click()
Dim temp As Double
Dim Result_Fahrenheit As Double
Dim Result_Celsius As Double

temp = Val(Me.txt_temp)

If Len(Trim(Me.txt_temp) & vbNullString) = 0 Then
     MsgBox "Enter temperature value please.", vbInformation
     Me.txt_temp.SetFocus
     Exit Sub
End If
  Result_Fahrenheit = ((temp * 9) / 5) + 32
  
  Result_Celsius = ((temp - 32) * 5) / 9

If Me.Option2.Value = True Then
Me.Label18.Caption = "Temperature is " + Str(Round(Result_Celsius, 2)) + " Degree's Celsius."
End If

If Me.Option6.Value = True Then
Me.Label18.Caption = "Temperature is " + Str(Round(Result_Fahrenheit, 2)) + " Degree's Fahrenhiet."
End If

End Sub

Private Sub Form_Load()
Me.Option2.Value = ""
Me.Option6.Value = ""
End Sub

Private Sub Option2_AfterUpdate()
If Me.Option2.Value = True Then
Me.Option6.Enabled = False
End If
End Sub

Private Sub Option6_AfterUpdate()
If Me.Option6.Value = True Then
Me.Option2.Enabled = False
End If
End Sub