|
-
Aug 6th, 2001, 08:31 PM
#1
Thread Starter
PowerPoster
dbgrid data entry validation
Hey all,
How can i make sure that what the user enters is correct!
For example:
I have in the grid on it's button click event it shows a combo box. I want to make sure that if they manually enter data into that column that it's correct or stop them from manually entering data without selecting it from the combo box.
if that doesnt make sense please tell me?
thanks
-
Aug 6th, 2001, 09:19 PM
#2
Fanatic Member
Beacon mate
Im not sure if I have understood your question correctly
But If you were wanting to validate the text before it is written to the database
Use the Before Update and After Update events in the datagrid
Then you can have a routine in ther which checks the string for a set of your specified parameters
Let me know if im way off
-
Aug 6th, 2001, 09:32 PM
#3
Thread Starter
PowerPoster
yep figured it out did it this way:
Private Sub dbgrid_ColEdit(ByVal ColIndex As Integer)
If ColIndex = 0 Then
MsgBox "Please Select Item From List", vbExclamation, "InValid Entry"
ElseIf ColIndex = 2 Then
MsgBox "Please Select Item From List", vbExclamation, "InValid Entry"
ElseIf ColIndex = 3 Then
MsgBox "Please Select Item From List", vbExclamation, "InValid Entry"
End If
End Sub
So they cant type in values which is heaps better!
thanks anyways rudvs2
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
|