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.
My mobile number here in the Philippines is 09173084360.
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 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