Results 1 to 5 of 5
  1. #1
    Thompyt is offline Expert
    Windows 8 Access 2010 32bit
    Join Date
    Sep 2014
    Location
    El Paso, TX
    Posts
    839

    Popup Form Reference


    I have a base form that runs fine and fills out the table. I added a second popup form where I select a check in the base form. It always ends up referencing row 1 of the table. How do I get it to reference the same row as the data being input on the base table.

    The base form is a multiple item form.

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Maybe this is what you are looking for: http://www.baldyweb.com/wherecondition.htm

  3. #3
    Thompyt is offline Expert
    Windows 8 Access 2010 32bit
    Join Date
    Sep 2014
    Location
    El Paso, TX
    Posts
    839
    I took a gander at that, and figured some stuff out and adapted it to what I thought I needed. Now I get an Update, AddNew, or Edit error.

    Got rid of the error, but no updating per se. I tried this code for the check mark on the base form.

    Code:
    Public Sub SRW2Check_AfterUpdate()
    
    Dim rL As Object, NetNID As Long
    
    NetNID = Me.MainID 'set a variable to the current record
    
    Set rL = Forms!frmNetNodeIDs.RecordsetClone 'take it to the selected record
    
    If SRW2Check = True Then
        Forms!frmNetNodeIDs.Bookmark = rL.Bookmark
        rL.FindFirst "MainID = " & NetNID
            Form_frmSecondNet.Echelon2Combo.Visible = False
            Form_frmSecondNet.SubNet2Combo.Visible = False
                DoCmd.OpenForm "frmSecondNet" 'open the new form
    End If
    
        rL.Close
        Set rL = Nothing
    
    End Sub
    Attached Files Attached Files

  4. #4
    aytee111 is offline Competent At Times
    Windows 7 32bit Access 2013 32bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    I can't say that I can follow all that is going on when the box is ticked. If you want to open a form based on a selected record then all you need is:

    Docmd.OpenForm "frmSecondNet",,,"MainID=" & Me!MainID (assuming that MainID is unique in the query and will return only one record)

    That will open a form and display the currently selected record.

  5. #5
    Thompyt is offline Expert
    Windows 8 Access 2010 32bit
    Join Date
    Sep 2014
    Location
    El Paso, TX
    Posts
    839
    Thanks aytee111!!!
    That worked a charm. Much appreciated. I am playing with an idea w/this db.



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

Similar Threads

  1. popup form
    By Cosmo Monkey in forum Forms
    Replies: 1
    Last Post: 03-25-2013, 03:06 PM
  2. Popup form
    By marcsessoms in forum Forms
    Replies: 8
    Last Post: 02-17-2012, 08:53 PM
  3. form popup
    By fabiobarreto10 in forum Forms
    Replies: 30
    Last Post: 01-19-2012, 01:54 PM
  4. Popup form
    By triplee23 in forum Forms
    Replies: 1
    Last Post: 10-24-2010, 04:09 PM
  5. Popup Form
    By NISMOJim in forum Forms
    Replies: 1
    Last Post: 10-23-2010, 09:16 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