Donate SIGN UP

Visual Basic..................................

Avatar Image
keys | 22:35 Mon 07th Mar 2005 | Technology
5 Answers

im using access and visual basic as the code behind it. i want to enable a button only when the date in a text box is the same as in the database column (date). any part of the column on the bottom of the column or top or middle. this only works with the top (top row).

Thanks.......

Gravatar

Answers

1 to 5 of 5rss feed

Best Answer

No best answer has yet been selected by keys. Once a best answer has been selected, it will be shown here.

For more on marking an answer as the "Best Answer", please visit our FAQ.

Have you tried traversing the whole column?

Question Author

no, wot is traversing?

Traversing, go through every date in that column, if you find a match then enable the button.
Question Author

Thanks

Do you know wot coding i need? I dont know how to search through the columns. do u have an example of any kind.

thx

It's been a while, but try:

DataBase.Recordset.Index = "FieldName"

DataBase.Recordset.Seek "=", SearchStr 'do the search
If DataBase.Recordset.NoMatch = false Then

   Button1.enabled = true        'enable the button
End If

where:

DataBase is the name of your database

FieldName is the column you want to search

SearchStr is the date you want to find

1 to 5 of 5rss feed

Do you know the answer?

Visual Basic..................................

Answer Question >>