[AccessD] Macros (ugh)
Stuart McLachlan
stuart at lexacorp.com.pg
Sat Nov 22 20:04:21 CST 2025
That number suggests a corrupt record to me which would cause indexing
issues.
It's 2,150,864,057 as a DWORD.
First thiing I'd do is open the table and examine the data - and try to delete
any obviously corrupt records.
On 22 Nov 2025 at 17:46, Rocky Smolin wrote:
> Thanks Gustav. That's a lot cleaner way to do that than the original
> programmer did it - probably back in the previous century.
>
> So I do not get the message about macros, which is progress. Still
> doesn't find the record, though.
>
> The Find field - case# - is a PK so long integer. . My test case has
> the case# of -2144103239. I don't know how they got that big, but
> there it is. Couple that have anything to do with the failure to Find?
>
> TIA
>
> Rocky
>
>
>
> On Fri, Nov 21, 2025 at 11:38PM Gustav Brock via AccessD <
> accessd at databaseadvisors.com> wrote:
>
> > Hi Rocky
> >
> > Don't know about the macros, but that code opens the recordset
> > multiple times. Try being more specific and use one instance only:
> >
> > Dim Records As DAO.Recordset
> >
> > Set Records = Me.RecordsetClone
> > If Records.RecordCount > 0 Then
> > Records.FindFirst "[case#] = " & Me![List283]
> > If Not Records.NoMatch Then
> > Me.Bookmark = Records..Bookmark
> > Else
> > MsgBox Me![List283] & " " & Me.List283.Column(1) & " not
> > found."
> > End If
> > Records.Close
> > End If
> >
> > /gustav
> >
> > ________________________________
> > Fra: AccessD <accessd-bounces+gustav=cactus.dk at databaseadvisors.com>
> > på vegne af Rocky Smolin <rockysmolin2 at gmail.com> Sendt: Lørdag 22
> > November 2025 02:43 Til: Access Developers discussion and problem
> > solving < accessd at databaseadvisors.com> Emne: [AccessD] Macros (ugh)
> >
> > Dear List:
> >
> > I am working with a database which was written in 97 and the client
> > has only the replica. So I managed to import all of the objects into
> > a new front end and display the data entry main form which (after
> > creating an abbreviated main menu) I have to get working.
> >
> >
> > First problem was that recordsetclone does not work. NoMatch is
> > True.
> >
> > Me.RecordsetClone.FindFirst "[case#] = " & Me![List283]
> > MsgBox Me.RecordsetClone.NoMatch & " " & Me![List283] & " " &
> > Me.List283.Column(1)
> > Me.Bookmark = Me.RecordsetClone.Bookmark
> >
> > where case# is an autonumber field and Me![List283] is a list box
> > of case numbers and column (1) of that list box is the client name.
> >
> > So I tried DoCmd.FindRecord ME![case#]
> >
> > But I get an error:
> >
> > A macro set to one of the current field's properties failed because
> > of an error in a FindRecord action argument.
> >
> > So I deleted all the macros in the navigation pane.
> >
> > Same error message.
> >
> > Then I ran:
> >
> > ' Iterate through all macros in the AllMacros collection
> > Set dbs = Application.CurrentProject
> > For Each obj In dbs.AllMacros
> > Debug.Print obj.Name ' Print macro name in Immediate Window
> > Next obj
> >
> > and it found no macros. Which I would expect as it's looking in the
> > Macro container.
> >
> > So where could this macro be hiding?
> >
> > MTIA
> >
> > Rocky
> > --
> > AccessD mailing list
> > AccessD at databaseadvisors.com
> > https://databaseadvisors.com/mailman/listinfo/accessd
> > Website: http://www.databaseadvisors.com
> >
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> https://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
More information about the AccessD
mailing list