RE: Find and Find Next

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



I'm assuming you have a continuous form with a bunch of records showing.

In a command button click event have the following:

With Me.RecordsetClone
.MoveFirst
Do Until .EOF
If whatever Then
Me.BookMark = .BookMark
control.SetFocus
MsgBox etc.
Exit Sub
End If
.MoveNext
Loop
End With

--
Pictou


"Rob" wrote:

I have a form that pulls multiple records based on a combo box and the
records are displayed in the form. The user then proceeds to enter data. I
want to set up as part of my closing of the form a find record that matches
certain criteria and the cursor goes to that record. The criteria is
"ChkUnaccept = Yes and TxtOccur = 0". The user corrects the error and then
clicks the close button to see if there are any others. If there are then
the cursor goes to the next record where this occurs until it doesn't find
any more and then a macro is run. I just need the code to have the record
found until it goes to the End of the form and finds no records. Please
Help!!



.



Relevant Pages

  • Re: Interrpreting modifier codes in /etc/inputrc ??
    ... simply produces ";5C" at the cursor on my command line and Control ... Thanks for introducing me to the showkey command. ... on the command line for it to the sequences to operate on. ... # for non RH/Debian xterm, ...
    (Fedora)
  • RE: Looping with Userform
    ... Prior to this section the cursor is ... placed in the first cell of the order section via RANGE.Select. ... Knowing what global variables I need and how to declare them. ... This userform has two command buttons: ...
    (microsoft.public.excel.programming)
  • Re: Simple EDT or TPU init file
    ... command like: ... and update the window. ... If you don't care about the cursor position, ... SCROLL changes the editing point by leaving ...
    (comp.os.vms)
  • Re: Cursor in Grid
    ... Yes, but when i click on the commandbutton, even if there is no command on ... or I just loose focus on grid1 with recordsource cursor1, ... It always selects the last cursor I created on ... > As a grid refreshes, it automatically changes the work area to its ...
    (microsoft.public.fox.programmer.exchange)
  • Re: ADO Record Count
    ... this was the case that hit me. ... Main factor seems to be the a combination of cursor type and cursor location ... >> try to process records that aren't there. ... Checking EOF and BOF fixed it. ...
    (microsoft.public.vb.database.ado)