Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

2 Datagrid questions

Status
Not open for further replies.

daimaou

Programmer
Apr 4, 2001
154
PT
I'm using a datagrid to display records from a MS Access DB using ADO, and I'm trying to do 2 things with the datagrid that I'm not sure how.

First, I need to make all the cells of one column to be a combo box bound to another table of my DB, since on that field the user can only pick values from this other table. I've seen no option for this so I suppose I'll have to code it?

Secondly, how can I mask a cell on a datagrid? One of the fields is a password and I only want to show ***** and not the actual password value. The user will be able to write there also, but it should only see **** and not what they are writing into there.

If anyone can help I'd appreciate it.
 
Hi,

ButtonClick Event can be solution for the first.


You can use BeforeColEdit & ColEdit events to echo an asterik instead of the typed character.

Hope this helps

Vikas
 
Hi...

Here is a start up for your 2nd question


Private Sub Password()
dim nCounter As Integer
dim x As Integer

nCounter = Me.MSFlexGrid.Rows
x = 1
For x = 1 To (nCounter - 1)

-->the -1 is if you have a fixed row for title of column

Me.MSFlexGrid.Row = x
Me.MSFlexGrid.Col = 5 (for eg)
If Me.MSFlexGrid.Text <> &quot;&quot; Then
Me.MSFlexGrid.Text = &quot;********&quot;
Else
Me.MSFlexGrid.Text = &quot;********&quot;
End If
Next
End sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top