This is the code I have to validate control number that we use to keep track of our inventory. However, I dont know much about Access so I have written and tested this function in VB.Net on Visual Studio. Now, I need to convert my code so it work in Access. Can someone please help me.
Thank you

Public Class Form1
    Dim charArray() As Char
    Private Sub btnCheck_Click(ByVal sender As System.Object, ByVal e A System.EventArgs) Handles btnCheck.Click
        Dim ValidChar As Boolean
        ValidChar = True

        If txtCheck.Text = Nothing Then
            MsgBox("Cannot have Null Control Number")
            charArray = txtCheck.Text.ToCharArray()

            If txtCheck.TextLength <> 10 Then
                ValidChar = False
                If charArray(0) < "A" Or charArray(0) > "Z" Then
                    ValidChar = False
                    For charCount As Integer = 1 To 9
                        If charArray(charCount) > "9" Or charArray < "0" Then
                            ValidChar = False
                            Exit For
                        End If
                End If

           End If

    End If
    If ValidChar = False Then
       MsgBox("Invalid control number")

    End Sub

End Class

I have asked to move this to, the second post of course is a different story...

Dim charArray As String

charArray = "My string here"

Text20.Text = charArray
This question has already been answered. Start a new discussion instead.