Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

find record, find next? 1

Status
Not open for further replies.

Donkeygirl

Technical User
Nov 30, 2000
52
US
I have a search field on a form, to look for the title of an event. If the person types in election, there may be more than one record for that. Election Day, and Election Inspector, are examples. Now I have a button with macro onclick: GoToControl, Find record, which finds one of them, what I am looking for help on is, how can I have the second click initiate a find next?, and a third click?
etc.
Thanks, I hope someone can help. This database app is really cool, and I may get to show it to my boss tomorrow, which is really awesome. I would just like to have this fixed.
:)
Donkeygirl,
Kickin' the crap out of Access
 
Hi
you can keep a static variable in your code. For example:

private sub cmdFind_Click()
static iNBClick as integer
if iNBClick = 0 then
...
... Findirst
iNBClick=INBClick + 1
else
...
... FindNext
endif
end sub Mal'chik [bigglasses]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top