Results 1 to 4 of 4
  1. #1
    Middlemarch is offline Competent Performer
    Windows 10 Access 2019
    Join Date
    Mar 2015
    Posts
    365

    Bookmark


    Can't quite figure out the correct syntax... been trying various forms of
    Code:
    Dim b As DAO.Recordset
    Set b = Forms.Form1.Datasheet.Form.RecordsetClone
    Forms.Form1.Datasheet.Form.Bookmark = b.Bookmark
     Forms.Form1.Datasheet.Form.Requery
     Forms.Form1.Datasheet.Form.Bookmark = b
    The aim is to requery the Form and return to the same record.

  2. #2
    Gicu's Avatar
    Gicu is online now VIP
    Windows 10 Access 2013 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,115
    Try to requery the form's recordset instead:

    Forms!frmYourForm.Form.Recordset.Requery

    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  3. #3
    Middlemarch is offline Competent Performer
    Windows 10 Access 2019
    Join Date
    Mar 2015
    Posts
    365
    That gives me Object doesn't support this property or method
    My forms name is Datasheet and it's a subform on Form1.
    I tried "." and "!" but same error.
    And should this work without Bookmark ?
    Thanks

    Later... I found Forms.Form1.Datasheet.Form.Recordset.Requery works, even though I thought I'd tried that first.
    Can you say why the "." not "!" ?

  4. #4
    Minty is offline VIP
    Windows 10 Office 365
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,003
    Datasheet is a reserved word and I would therefore think a bad choice of name for a form.
    Try enclosing it in square brackets? Or better still call it something else like frmDataSheet?

    The Dot and the Bang - long discussions here:
    https://www.access-programmers.co.uk....202806/page-2
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Not A Valid Bookmark!
    By mglevicky in forum Access
    Replies: 9
    Last Post: 02-14-2017, 03:43 AM
  2. saving bookmark
    By vientito in forum Programming
    Replies: 1
    Last Post: 10-29-2014, 11:51 AM
  3. Bookmark after Append Query
    By beckysright in forum Programming
    Replies: 1
    Last Post: 12-14-2012, 05:00 PM
  4. Bookmark problem
    By ybg1 in forum Programming
    Replies: 4
    Last Post: 11-15-2011, 02:21 PM
  5. Bookmark a record in a Form?
    By westcoastbmx in forum Forms
    Replies: 3
    Last Post: 10-29-2009, 03:13 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums