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








Friday, January 5, 2018

Word Counter in Microsoft Access

A very simple program that I wrote using Microsoft Access to ask the user to give a string or a sentence and then our program will count the number of words in the given sentence. 

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

'Count Words in a Sentence in Microsoft Access
' Written By Mr. Jake R. Pomperada, MAED-IT
' January 5, 2018  Frinday

Option Compare Database

Public Function WordCounter(Text As String) As Integer
Dim Counts As Integer
Dim dupText As String
dupText = Replace(Trim(Text), vbNewLine, " ")
If dupText = "" Then
    Counts = 0
Else
    Counts = 1
    For i = 1 To Len(dupText)
        If Mid(dupText, i, 1) = " " Then ' use Mid to search space
            If Mid(dupText, i - 1, 1) <> " " Then
                Counts = Counts + 1
            End If
        End If
    Next
    
Me.Label15.Caption = "Total number of words is " + Str(Counts) + "."
End If

End Function
Private Sub Command16_Click()
Dim word_count As Integer

If Len(Trim(Me.Text13) & vbNullString) = 0 Then
     MsgBox "Enter a sentence", vbInformation
     Me.Text13.SetFocus
     Exit Sub
End If
 WordCounter (Me.Text13)

End Sub


Private Sub Command17_Click()
Me.Text13 = ""
Me.Label15.Caption = ""
Me.Text13.SetFocus
End Sub

Private Sub Command18_Click()
DoCmd.OpenForm "frmAbout"

End Sub




Vowels and Consonants Counter in Microsoft Access

In this article I would like to share with you a sample program that will ask the user to give a sentence and then our program will count the number of vowels and consonants in given sentence by our user. I am using Microsoft Access 2010 as my programming tool in writing this program.

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

'Count Vowels and Consonants in Microsoft Access
' Written By Mr. Jake R. Pomperada, MAED-IT
' January 5, 2018  Frinday

Option Compare Database

Const vowels = "aeiou"
Const consonants = "bcdfghjklmnpqrstvwxyz"

' This function will count the number of vowels in a given sentence
Private Function CountVowels(strText As String) As Integer
    Dim i As Integer
 Dim asciiToSearchFor As Integer
    For i = 1 To Len(LCase(strText))
        If InStr(1, vowels, Mid$(strText, i, 1), vbTextCompare) Then
            CountVowels = CountVowels + 1
         End If
    Next i
End Function

' This function will count the number of consonants in a given sentence
Private Function CountConsonants(strText As String) As Integer
    Dim i As Integer
 Dim asciiToSearchFor As Integer
    For i = 1 To Len(LCase(strText))
        If InStr(1, consonants, Mid$(strText, i, 1), vbTextCompare) Then
            CountConsonants = CountConsonants + 1
         End If
    Next i
End Function
Private Sub Command16_Click()
Dim vowels_count As Integer
Dim consonants_count As Integer


If Len(Trim(Me.Text13) & vbNullString) = 0 Then
     MsgBox "Enter a sentence", vbInformation
     Me.Text13.SetFocus
     Exit Sub
End If

vowels_count = CountVowels(Me.Text13)
consonants_count = CountConsonants(Me.Text13)

 Me.Label15.Caption = "Total number of consonants is " + Str(vowels_count) + "."
 Me.Label19.Caption = "Total number of vowels is " + Str(consonants_count) + "."

End Sub


Private Sub Command17_Click()
Me.Text13 = ""
Me.Label15.Caption = ""
Me.Label19.Caption = ""
Me.Text13.SetFocus
End Sub

Private Sub Command18_Click()
DoCmd.OpenForm "frmAbout"

End Sub

Private Sub Form_Click()

End Sub





Odd and Even Number Checker in Microsoft Access

A simple program that I wrote using Microsoft Access to ask the user to give a number and then our program will check if the given number is an Odd or Even. The code is very easy to understand and use.  I use Microsoft Access 2010 in writing this program.

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


Option Compare Database

Private Function IsOdd(ByVal oddNumber As Integer) As Boolean
    IsOdd = oddNumber And 1
End Function

Private Sub Command16_Click()
Dim a As Integer


If Len(Trim(Me.Text13) & vbNullString) = 0 Then
     MsgBox "Enter the a Number", vbInformation
     Me.Text13.SetFocus
     Exit Sub
End If

a = Val(Me.Text13)

If IsOdd(a) Then
   Me.Label15.Caption = "The given number " + Str(a) + " is ODD number."
Else
  Me.Label15.Caption = "The given number " + Str(a) + " is EVEN number."
End If
End Sub


Private Sub Command17_Click()
Me.Text13 = ""
Me.Label15.Caption = ""
Me.Text13.SetFocus
End Sub

Private Sub Command18_Click()
DoCmd.OpenForm "frmAbout"

End Sub





Monday, January 1, 2018

Decimal To Roman Numeral in Microsoft Access

A program that I wrote using Microsoft Access to accept a number from your user and then it will convert the given number into it's roman numeral equivalent. I am using Microsoft Access 2000 in writing this application. 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

' Written By Mr. Jake R. Pomperada, MAED-IT
' January 1, 2018 Monday
' Microsoft Access 2000

Option Compare Database
Public Function RomanNumeral(ByVal aValue As Long) As String
  Dim i&
  Dim varArabic As Variant, varRoman As Variant
  Dim strResult As String

  varArabic = Array(1, 4, 5, 9, 10, 40, 50, 90, 100, 400, 500, 900, 1000)
  varRoman = Array("I", "IV", "V", "IX", "X", "XL", "L", "XC", "C", "CD", "D", "CM", "M")

  For i = UBound(varArabic) To LBound(varArabic) Step -1
    Do While aValue >= varArabic(i)
      aValue = aValue - varArabic(i)
      strResult = strResult & varRoman(i)
    Loop
  Next i
  RomanNumeral = strResult
End Function

Private Sub Command5_Click()

Dim val_number, display As Double

If Len(Trim(Me.Text2) & vbNullString) = 0 Then
     MsgBox "Enter the a Number", vbInformation
     Me.Text2.SetFocus
     Exit Sub
End If

val_number = RomanNumeral(Me.Text2)

  
 Label8.Caption = "The roman numeral equivalent of " + Trim(Me.Text2) + _
 " is " + Trim(val_number) + "."

End Sub

Private Sub Command6_Click()
Me.Label8.Caption = ""
Me.Text2 = ""
Me.Text2.SetFocus
End Sub

Private Sub Command7_Enter()
  MsgBox ("This program was written by Mr. Jake R. Pomperada")
End Sub




Palindrome in Microsoft Access

In this article I would like to share with you a sample program that will ask the user to give a string or a word and then our program will check and determine if the given word is a Palindrome or Not a Palindrome. I use Microsoft Access 2003 in writing this program.

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

Option Compare Database

Private Sub Command12_Enter()
Me.txtvalue = ""
Me.Label9.Caption = ""
Me.txtvalue.SetFocus
End Sub
Function IsPalindrome(sInput As String) As Boolean
If sInput = StrReverse(sInput) Then
IsPalindrome = True
Else
IsPalindrome = False
End If
End Function
Private Sub Command13_Click()
Dim Sure As Integer

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

Private Sub Command7_Click()
Dim val_solve As Integer
Dim str_me As String

If Len(Trim(Me.txtvalue) & vbNullString) = 0 Then
     MsgBox "Kindly give a number", vbInformation
     Me.txtvalue.SetFocus
     Exit Sub
End If

Label9.Visible = True
     
        If IsPalindrome(Me.txtvalue) = True Then
            Label9.Caption = "The given word " + UCase(Trim(Me.txtvalue)) + " is a Palindrome."
        Else
           Label9.Caption = "The given word " + UCase(Trim(Me.txtvalue)) + " is Not a Palindrome."
        End If

End Sub







Factorial Solver in Microsoft Access

A simple program that will ask the user to give a number and then our program will compute the factorial value of the given number by our user. I am using Microsoft Access 2003 in developing this program.

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

Option Compare Database

Function Factorial(Num As Integer)
Dim i As Integer, answer As Double
answer = 1
For i = 1 To Num
answer = answer * i
Next i
Factorial = answer
End Function

Private Sub Command12_Enter()
Me.txtvalue = ""
Me.Label9.Caption = ""
Me.txtvalue.SetFocus
End Sub

Private Sub Command13_Click()
Dim Sure As Integer

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

Private Sub Command7_Click()
Dim val_solve As Integer


If Len(Trim(Me.txtvalue) & vbNullString) = 0 Then
     MsgBox "Kindly give a number", vbInformation
     Me.txtvalue.SetFocus
     Exit Sub
End If

Label9.Visible = True

val_solve = Factorial(Val(Me.txtvalue))

Label9.Caption = "Factorial value is " + Str(val_solve) + "."

End Sub