Results 1 to 6 of 6
  1. #1
    degras is offline Advanced Beginner
    Windows 7 Access 2007
    Join Date
    Nov 2010
    Posts
    72

    How to sync records in datasheet form?

    I have a single record form and a datasheet form. How is it possible to sync the record navigation of these forms? It would be nice if when a record is double clicked in the datasheet it causes the other form to show the same record.

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Is one form a SubForm of the other?

  3. #3
    degras is offline Advanced Beginner
    Windows 7 Access 2007
    Join Date
    Nov 2010
    Posts
    72
    Quote Originally Posted by RuralGuy View Post
    Is one form a SubForm of the other?
    No they are two separate forms, both looking at the same table.

    I tired the following code in the on dbl click event:

    DoCmd.OpenForm FormName:="Invoice2", WhereCondition:="[InvoiceNo] = " & Me!InvoiceNo
    DoCmd.Close acForm, Me.Name
    Forms![Invoice2].SetFocus

    ... but I get an error 3464 on the first of these lines of VBA code.

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    My guess is your InvoiceNo is a string and not a number. Try:
    DoCmd.OpenForm FormName:="Invoice2", WhereCondition:="[InvoiceNo] = '" & Me!InvoiceNo & "'"

  5. #5
    degras is offline Advanced Beginner
    Windows 7 Access 2007
    Join Date
    Nov 2010
    Posts
    72
    Thanks. That was the problem, it works fine now.

  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Great! Glad we could help.

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

Similar Threads

  1. validation with a datasheet form
    By Grooz13 in forum Forms
    Replies: 1
    Last Post: 01-12-2011, 10:42 AM
  2. No new records in datasheet
    By eww in forum Forms
    Replies: 4
    Last Post: 10-14-2010, 12:40 PM
  3. Unattended Sync
    By frowsyone in forum Access
    Replies: 1
    Last Post: 05-26-2010, 04:48 AM
  4. Split Form Sync up
    By jonsuns7 in forum Forms
    Replies: 1
    Last Post: 11-10-2009, 02:56 PM
  5. Form - Datasheet View
    By kalove in forum Forms
    Replies: 0
    Last Post: 06-20-2007, 11:29 AM

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