Hey all,
Apologies for this question, as I imagine it will be very easy.
I'm creating a form that will be used to update fields in a table. I don't want the user to be able to update primary keys though, so I'm trying to disable the textbox so it can't be edited.
The textboxes are created during runtime, so I'm trying to create an If loop that will see if it is on the primary key column, but i'm unsure of how to do this. I tried doing this:
If dt.Columns(i).Unique = True Then
t(i).Enabled = False
End If
But this didn't work. I found an option called PrimaryKey which would go dt.PrimaryKey... something (I'm guessing) but just unsure of how to use it.
Thanks in advance :)