Friday, January 5, 2018

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



Sunday, December 31, 2017

Area of the Circle Solver in Microsoft Access

A very simple program that I wrote using Visual Basic for Application in Microsoft Access to compute the area of the circle. Our program will ask the user to give the radius of the circle and then it will compute then area. The code is very easy to understand and use.

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
'December 31, 2017 Sunday
' Microsoft Access 2000

Option Compare Database

Private Sub Command5_Click()

Dim val_radius, display As Double

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

val_radius = val(Me.Text2)

 area = 3.14 * (val_radius * val_radius)

 display = Round(area, 2)
 Label8.Caption = "The area of the circle is " + Trim(Str(display)) + "."

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




Positive and Negative Number Checker in Microsoft Access

A very simple program that I wrote using Visual Basic for Application in Microsoft Access 2000 to ask the user to give a number and then our program will check if the given number is a positive and negative number.

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
'December 31, 2017 Sunday
' Microsoft Access 2000

Option Compare Database

Private Sub Command5_Click()

Dim val_me As Integer

val_me = val(Me.Text2)


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

If (val_me >= 0) Then
   MsgBox ("The given number " + Trim(Str(val_me)) + " is a Positive Number.")
   Else
   MsgBox ("The given number " + Trim(Str(val_me)) + " is a Negative Number.")
  End If
End Sub

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

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