| | Submitted on: 6/20/2003 4:24:00 PM
By: Said Sowiny
Level: Advanced User Rating: Unrated Compatibility:VB 5.0, VB 6.0
Users have accessed this article 532 times. | (About the author) |
| | hi,.. if you want to check out an existance of a value in a table field or recordset to determine the acceptance of a new value and want to not dupplicate the value in the field ,.. here what you seek for.
or to decide a n action if the value exist
a pro ver. well be come soon.
| |
|
Terms of Agreement:
By using this article, you agree to the following terms...
1) You may use
this article in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
2) You MAY NOT redistribute this article (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.
3) You may link to this article from another website, but ONLY if it is not wrapped in a frame.
4) You will abide by any additional copyright restrictions which the author may have placed in the article or article's description. |
Public Function IsExist(ByVal strSource As String, ByVal strCriteria As String) As Boolean
Dim strSQL As String
Dim rstSource As Recordset
IsExist = False
strSQL = "SELECT * FROM [" & strSource & "] WHERE ((" & strCriteria & "));"
Set rstSource = gdbName.OpenRecordset(strSQL, dbOpenSnapshot)
If rstSource.RecordCount <> 0 Then
IsExist = True
End If
rstSource.Close
End Function
| |
Other 5 submission(s) by this author
|
|
|
Report Bad Submission |
|
|
Your Vote! |
See Voting Log |
|
Other User Comments |
There are no comments on this submission. |
|
Add Your Feedback! |
Note:Not only will your feedback be posted, but an email will be sent to the code's author in your name.
NOTICE: The author of this article has been kind enough to share it with you. If you have a criticism, please state it politely or it will be deleted.
For feedback not related to this particular article, please click here. |
|