Results 1 to 5 of 5
  1. #1
    crimedog is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2013
    Posts
    141

    OPen New Form at Record in Current form


    I have a form that has text box:[ID]
    I want to open Continuous form : to records with [RepId]=[ID]
    Currently I use [Combo3] to filter the query the form is based on using [RepID] ( [forms]![Frm2_RepQuota].[Combo3] )
    I went to the Baldy Link ( http://www.baldyweb.com/wherecondition.htm ) and came up with:
    Code:
    Private Sub Command116_Click()
    DoCmd.OpenForm "Frm2_RepQuota", , , "Combo3 = '" & Forms!EditRep.ID.Value & "'"
    DoCmd.Close acForm, "EditRep"
    End Sub
    I have tried it with and without '

    On Click I get text box asking for a parameter value for Combo3

  2. #2
    crimedog is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2013
    Posts
    141
    I have also substituted me.ID for Forms!EditRep.ID.Value

  3. #3
    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
    Reference field that has ID, not the combobox name. If the ID field is number type, do not use apostrophes.

    DoCmd.OpenForm "Frm2_RepQuota", , , "RepID = " & Me.ID

    Instead of opening the continuous form independently, why not have it as a subform? The records will automatically synchronize.
    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.

  4. #4
    crimedog is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2013
    Posts
    141
    Added as a subform -

  5. #5
    mathhero is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2012
    Posts
    6
    you must the field name

    Private Sub Search_Click()
    DoCmd.OpenForm "search2", , "[ser]", "[ser]=" & Me![ser]
    DoCmd.Close acForm, "FrmSearch"
    End Sub

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

Similar Threads

  1. base query on open form's current record.
    By Gbros5 in forum Queries
    Replies: 2
    Last Post: 05-29-2014, 03:14 PM
  2. Replies: 3
    Last Post: 04-18-2014, 12:20 PM
  3. Replies: 10
    Last Post: 10-14-2013, 10:18 AM
  4. Replies: 2
    Last Post: 04-02-2013, 02:24 AM
  5. Open form to current record
    By rbpd5015 in forum Access
    Replies: 1
    Last Post: 08-28-2009, 01:53 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