Results 1 to 4 of 4
  1. #1
    wes9659 is offline Advanced Beginner
    Windows 8 Access 2010 64bit
    Join Date
    Apr 2014
    Location
    Dover, Ohio
    Posts
    88

    Creating Form to Target Current Record Open in Another Form

    Hopefully this will Explain my Predicament
    Question:
    I have three objects a Main_Table , ClientDataForm and a MapForm all three share a common ClientID number

    From that Main_Table I have created a ClientDataForm form which I enter all Data
    From ClientDataForm I wish to create a button on it which runs a Macro that Saves ClientDataForm Record and then populates another form named MapForm with whatever record is currently open in Form One whether a newly created one or previous record. Does anyone know How would I write this code for that button? Also why I would write it that way?

    I have been racking my brain lol Thanks Everyone for all your support

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    You just want to open MapForm filtered to the same record on ClientDataForm? Why? If you just viewed record on ClientDataForm why do you need to then view it on MapForm?

    What field has the unique ID of records on ClientDataForm? Use that ID to filter MapForm.

    DoCmd.OpenForm "MapForm", , , "ID=" & Me.ID
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    wes9659 is offline Advanced Beginner
    Windows 8 Access 2010 64bit
    Join Date
    Apr 2014
    Location
    Dover, Ohio
    Posts
    88
    Thank You For your Help.

    I have attached a version of the access database located in dropbox. Basically I tried to word question using generic table names. So when you look at the project the main table is actually called the Primary_Data_Table, Form One would correspond to my Basic Demographics Form and MapForm would correspond to FrmClientHomeLocator. The button is located on the Basic Demographics form named Client Home Locator. It is set to Macro named MarcoMap . (Funny thing also if you click on background anywhere on Basic Demographics Form it launches MapMacro.


    Bill

    https://www.dropbox.com/s/b6gvyew3bn...essProject.zip

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    You are using Navigation Control/Form. I don't use this object/control. Don't like it, I think it is more difficult to work with. Review https://www.accessforums.net/forms/t...orm-32053.html

    It might be the reason that clicking anywhere on background executes opening the form but why the map form button and not one of the other two is beyond me.

    I also do not use macros, only VBA.

    Sorry, can't help.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Opening Form To a Record Inside a Target SubForm
    By RichardAnderson in forum Forms
    Replies: 5
    Last Post: 04-18-2014, 05:19 PM
  2. Replies: 10
    Last Post: 10-14-2013, 10:18 AM
  3. Replies: 2
    Last Post: 04-02-2013, 02:24 AM
  4. Replies: 3
    Last Post: 01-14-2010, 08:32 AM
  5. Open form to current record
    By rbpd5015 in forum Access
    Replies: 1
    Last Post: 08-28-2009, 01:53 AM

Tags for this Thread

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