| re: Lots of problems / errors
Darryl Gore wrote:
[color=blue]
> Hi,
>
> My girlfriends mum has just sent me a list of problems with their access
> database that I set up.
>
> firstly they got this error
>
> msaccessmp8 has caused an error in MSACCESSMP8.EXE & will now close. restart
> computer if problem persists
>
> Then they get this one;
>
> On the job sheet page, you fill in all the info but when you push refresh
> ERROR MESSAGES come up in every field and then the screen freezes with no
> way out but to restart the computer.
> It started yesterday when Diane got a 'database has reached maximum capacity
> message.
> Do we deleted a bunch of old records from the started of the database hoping
> this would allow us to continue.
> But now we keep getting that INVALID BOOKMARK message
>
> which is copied and pasted below
>
> You tried to set a bookmark to an invalid string.
> This error can occur if you set the Bookmark property to a string that is
> invalid or wasn't saved from previously reading a Bookmark property. For
> example, the following code produces this error:
>
> Sub SetBookmark()
> Dim dbs As Database
> Dim rstEmployees As Recordset
> Dim strPlaceholder As String
>
> Set dbs = OpenDatabase("Northwind.mdb")
> Set rstEmployees = _
> dbs.OpenRecordset _
> ("Employees", dbOpenDynaset)
> strPlaceholder = "1"
> rstEmployees.Bookmark = strPlaceholder ' Not a valid bookmark.
> End Sub
>
>
> The Northwind.mdb I used as a start and template for their database.
>
> Thanks for any help
> Darryl
>
>[/color]
A bookmark is a byte, not a string. Here is an example of setting the
current record in a form to a record in the form's recordset.
Dim rst As Recordset
set rst = Me.Recordsetclone
rst.FindFirst "EmpLast = 'Gore' And EmpFirst = 'David'"
'set the form's record to the found record in Employees
Me.Bookmark = rst.Bookmark
set rst = Nothing |