Ok...I have bee searching around google with no luck..so now I'm asking...
How would I go about changing the input mask in MS Access with visual basic code...I am using CREATE TABLE
Here is the code of the code...
The below code creates a new table with in my main database(.mdb) and changes the text property and makes it required, but I also want to be able to change the Input Mask to be password
vb Code:
Dim oConn As OleDbConnection Dim oComm As OleDbCommand Dim oConnect, oQuery As String oConnect = strConnection oQuery = "CREATE TABLE AccessTest (ID Counter," & _ "Name TEXT(50) NOT NULL," & _ "PRIMARY KEY(ID))" oConn = New OleDbConnection(oConnect) oComm = New OleDbCommand(oQuery, oConn) Try oConn.Open() oComm.ExecuteNonQuery() oConn.Close() Catch ex As OleDb.OleDbException Catch ex As Exception MsgBox(ex.Message & vbCrLf & ex.StackTrace) Finally If Not (oConn Is Nothing) Then oComm.Dispose() oComm = Nothing End If End Try
This code works perfectly so far...I just can't figure out how to change the input mask...I am pretty good with vb, slightly new to databases
Thanks in advance for any help...![]()





Reply With Quote
