Page 2 of 2 FirstFirst 12
Results 16 to 25 of 25
  1. #16
    thekruser is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Aug 2010
    Posts
    93

    And I did delete the control source. Forgot to mention that...oops!!

  2. #17
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Can you post the db, or a representative sample?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #18
    johnpaul is offline Novice
    Windows Vista Access 2003
    Join Date
    Sep 2010
    Posts
    21
    Quote Originally Posted by pbaldy View Post
    Is this what you're trying to do?

    BaldyWeb wherecondition
    pbaldy,

    I beleive this is what I am trying to do

    I have got this from the wizzard
    Private Sub Command15_Click()
    On Error GoTo Err_Command15_Click
    Dim stDocName As String
    Dim stLinkCriteria As String
    stDocName = "DisciplineRecord"

    stLinkCriteria = "[EmployeeNumber]=" & "'" & Me![EmployeeNumber] & "'"
    DoCmd.OpenForm stDocName, , , stLinkCriteria

    Exit_Command15_Click:
    Exit Sub
    Err_Command15_Click:
    MsgBox Err.Description
    Resume Exit_Command15_Click

    End Sub

    Is it the green part I need to adjust and where in the code do I need to make changes

    I need to reference the employee number on my DB which is a text field

  4. #19
    johnpaul is offline Novice
    Windows Vista Access 2003
    Join Date
    Sep 2010
    Posts
    21
    Looking at it though it is showing all records that are under this employee number.

    The issue I am having now is that when I add to the table it is not auto filling the employee number, this is just blank and not referenced to the employee?

  5. #20
    thekruser is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Aug 2010
    Posts
    93
    Here is a representative db with all of the same code.

    Converted to .mdb.

  6. #21
    thekruser is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Aug 2010
    Posts
    93
    And, if you have time, can you help me figure out why the 'Name' field shows blank when the frmIndividualDataEdit opens? Also, I think this method might be the answer I am looking for in this post:

    https://www.accessforums.net/forms/c...ople-8199.html

  7. #22
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    It errors for me. The problem isn't with the combo being bound on the second form, it's that you don't reference the first combo in your code.

    lngBookmark = Me.EmployeeID

    should be

    lngBookmark = Me.cboSelectIndividual
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  8. #23
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    The name field is blank because the combo is unbound.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  9. #24
    thekruser is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Aug 2010
    Posts
    93
    Sweet...now the form opens correctly. I could have sworn I tried that yesterday. Long day. Oh well, such is life.

    Thank you for your help. Do you think the same method could be used to solve the problem in the other thread? If so, what would you suggest?

  10. #25
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    I haven't read the entire thread, but from the initial description it sounds like this type of thing would work:

    http://www.baldyweb.com/MultiselectAppend.htm
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 07-27-2010, 02:27 PM
  2. Replies: 1
    Last Post: 07-07-2010, 11:06 AM
  3. Export Command Button in Form
    By jjmartinson in forum Forms
    Replies: 3
    Last Post: 08-25-2009, 01:28 AM
  4. Adding Command Button To Form
    By uneek78 in forum Forms
    Replies: 7
    Last Post: 03-27-2009, 07:43 PM
  5. Open a linked subform with a command button
    By flablueeyedblond in forum Forms
    Replies: 0
    Last Post: 11-18-2005, 01:18 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