Visual Basic/vb6 database



I already have sent a question to you about my programming but my question was incomplete, my question is,

1) I want to get a validation on "Contact No.", "PAN" and "FAX", that is the no. must be check whether it is greater than ten digit or not, if the user wrongly write above ten digit then a message box display on the screen "No. withing ten digit" and the cursor point on the respective Text Box;

2) Another validation I want to get that whether the same name inputted by the user,like firstly I write "Niladri Sen" and at the same time add this record to the database, after that again I write this name and want to add to the database file, a message box display on the screen "Duplicate name not allowed..."

TEMPORARITY these are my problems, I am very very sorry that I sent you an incomplete question, but sir at present I am a confusing situation, please sir help me, thanks in advance.

Private Sub Command1_Click()
Dim ContNum As String
If Len(Text1) < 10 Then
MsgBox ("must have ten letters")
ContNum = Text1
'  Print ContNum
'.... declare a variable  and store this val and update the record
End If
End Sub

for checking if the value exists you need to create a function and pass this value to that which will ope the table readonly and check for this value in that field. and return true or false so that you can update the value

Visual Basic

All Answers

Answers by Expert:

Ask Experts




visual basic application programming from design to access information, sql, engineering and commercial applications. access databases, excel.(VB6) basic questions in vb 2008. Optional: 1)a large number of people want me to do work which takes some time and effort. can do projects in vb 2008. Pl.note that i would like to be paid for such work. 2) if you want me to spend quality time and do special work, i expect to be paid a reasonable price for my time. 3) if you are pleased with my reply you could consider a good amount. 4) you can visit my website


programming since the past 15 years. have completed a large number of projects in Industrial applications, finance,accounts, correspondence. excel macros etc

engineering, management degrees.

Past/Present Clients
project work for a Norway company,USA company and a Canadian company completed. Freelance Project work and Teaching. helping programmers with their work
teaching vb

©2016 All rights reserved.