how to validate email field and website field. Means, in email @ and . is compulsory
and in website www and . is compulsory, something like this
Why not use InStr?
If InStr(Email$, "@") > 0 Then 'Valid Email Format
If UCase$(Left$(Website$, 4))="WWW." then 'valid web format
If UCase$(Left$(Website$, 11))="HTTP://WWW." then 'valid web format
thnx for reply.
suppose some one enter "abcd@abcd"
without entering ".com / .org / .net" then how to validate?
Well, you'll have to check for thsoe as well. But what's to prevent someone from entering "email@example.com" as a bogus address? There's really no way to validate legitimate addresses. I would check for the presence of an @ sign and a period in the input, and assume they typed a legitimate address.
Check for both...
If InStr(Email$, "@") > 0 AND InStr(Email$, ".") > 0 Then
'Valid Email Format
else 'not valid
thnx for solutions