go to next record issues

M

mark kubicki

I have an (inherited) form that I've been adding a lot of code
it is essentially a one record at a time data entry form

suddenly I notice that "GoTo First / Last" (command buttons)... does not
take me to the first or last record (moving to the top of the table, stops
at record 2; down- a few before the last (although I have not checked if
this "last" position is dynamic to the number of records in the table...)
...."GoTo Next / Previous" also will cycle thru the records up to the same
records that I can access thru "GoTo First / Last"...

the records are present in the data sheet view; I simply can't get to them
through the form

last night, I noticed that my combination box to take you to a specific
record is not working either...

---> what's going on? is the table corrupted? can it be fixed; should I be
looking elsewhere for a problem


Private Sub cboGoToType_AfterUpdate()
On Error GoTo ErrorHandler
Dim strSearch As String
strSearch = "[Type] = " & Chr$(34) & Me![cboGoToType] & Chr$(34)
Me.RecordsetClone.FindFirst strSearch
Me.Bookmark = Me.RecordsetClone.Bookmark
....
End Sub


(as always) thanks in advance,
mark
 
G

Guest

Mark

Sounds like you may have a filtered invoked without realising it. Try
including the line

Me.FilterOn = False

somewhere in the button code and see if the effect still occurs. You can,
if you want, precede that line with a Debug.Print statement like

Debug.Print Me.Filter
Me.FilterOn = False

That will display the filter string (if set) in the immediate window.

As for the combo problem, check the NoMatch property and make sure it is
actually finding a record. The filter will also apply to the clone since it
is created dynamically, so make sure that the filter is off, then check the
NoMatch. If NoMatch is tru after the find, the bookmark will end up
undefined and copying it to the form will not do anything, or nothing useful
anyway.

HTH
Keith
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top