|
-
Nov 4th, 2009, 07:19 PM
#1
Thread Starter
Member
Changing "Input Mask" in ms access with code
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...
Last edited by Shadow45o; Nov 5th, 2009 at 08:23 AM.
-
Nov 5th, 2009, 08:25 AM
#2
Thread Starter
Member
Re: Changing "Input Mask" in ms access with code
Anyone have any ideas or a place I could go to find out...I have tried a lot of different things with no luck...
All I need is ta be able to change, in this case, the name column to have an Input Mask that is set for a password. I didn't think it would be hard...but I have had no luck...any ideas?
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|