Results 1 to 2 of 2
  1. #1
    halfaguava is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2011
    Posts
    5

    Form Not Opening Correct Record

    Hello,



    I have two forms:

    1. A list of multiple records
    2. A Data entry form

    When a user double clicks on a record from form 1, form 2 opens and allows them to view and edit this record.

    However double clicking always opens the first record, not the record clicked on

    This is the macro I used....

    Code:
    If Not IsNull([BuildingID]) Then
    
    OpenForm
    
    Form Name: RecordOpen
    View: Form
    Where Condition: == "[BuildingID]=" & [BuildingID]
    
    End If

    I had to type that out, as it Office 2010 has an awful macro tool thing.

    I copied this from a template which works, why doesn't it work for me!?


    Many Thanks

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,725
    You might want to investigate using vba.

    You can put controls on your forms and Access will generate vba code for various Events. You can adjust the generated code to include things you want.

    There is a DoubleClick event and a button has a Click event.
    You can Docmd.OpenForm "yourForm,,, and identify the record to be opened.....


    There are some very useful, FREE video tutorials at dataPig.
    see http://www.datapigtechnologies.com/AccessMain.htm

    Good luck.

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

Similar Threads

  1. Replies: 1
    Last Post: 11-09-2010, 03:02 PM
  2. Opening a form at a blank record
    By Remster in forum Forms
    Replies: 2
    Last Post: 09-14-2010, 07:46 AM
  3. Replies: 1
    Last Post: 08-27-2010, 05:16 AM
  4. Opening form to correct record. Bookmark?
    By stephenaa5 in forum Forms
    Replies: 11
    Last Post: 12-29-2009, 02:43 PM
  5. Replies: 4
    Last Post: 07-22-2009, 02:33 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