Friday, January 19, 2018

Palindrome Number Checker in Microsoft Access

A simple program that I wrote using Microsoft Access Visual Basic Application that will ask the user to give a number and then our program will determine and check if the given number is a Palindrome or Not a Palindrome. The code is very simple and easy to understand.

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

'Palindrome Number Checker in Microsoft Access
'Written By Mr. Jake R. Pomperada, MAED-IT
'January 19, 2018 Bacolod City, Negros Occidental
'jakerpomperada@gmail.com and jakerpomperada@yahoo.com

Option Compare Database


   Public Function CheckNumberPalindrome(value_input) As Integer
    Dim n, r, sum, t As Integer
        n = value_input
        sum = 0
        t = n
        While n <> 0
            r = n Mod 10
            sum = sum * 10 + r
            n = n \ 10
       Wend
       
       If sum = t Then
   
     Me.Label15.Caption = "The given number " + Str(value_input) + " is a Palindrome Number."
    Else
  Me.Label15.Caption = "The given number " + Str(value_input) + " is Not a Palindrome Number."
End If
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)

CheckNumberPalindrome (a)

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




No comments:

Post a Comment