Results 1 to 5 of 5
  1. #1
    akika is offline Novice
    Windows 10 Access 2016
    Join Date
    Aug 2018
    Posts
    27

    access 2016 , open existing record from another form when click hyperlink

    hi


    pls help

    I have a form in columnar list format
    ID, EmployeeID, Name, Address, Phone

    The ID and Employee ID has a hyperlink, which when click upon should open the form "employee detail".

    Which vba procedure should be used to do this action?


    I've tried but not ok
    docmd.openform "employee_detail", acFormDS, "EmployeeID"

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,926
    WHERE CONDITION is incomplete. You need a parameter, such as reference to a control or field on form:

    DoCmd.OpenForm "employee_detail", acFormDS, "EmployeeID=" & Me!EmployeeID
    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
    akika is offline Novice
    Windows 10 Access 2016
    Join Date
    Aug 2018
    Posts
    27
    Thxs one more query plz.
    How can open another form from an existing form using the employee ID.
    from the form list of employee when click ID open form employee_detail specific record.

    When adding the code.. its not opening the specific record but the first record in the table.
    for e.g ID 1234 should open form employee with ID 1234 but am getting 1000 which is the first record in the table

  4. #4
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,933
    Show your code.
    Put the criteria into a string variable and then use a debug.print to see what the criteria is.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  5. #5
    akika is offline Novice
    Windows 10 Access 2016
    Join Date
    Aug 2018
    Posts
    27
    it working now thxs

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

Similar Threads

  1. Replies: 6
    Last Post: 02-01-2022, 04:38 PM
  2. Replies: 3
    Last Post: 08-29-2019, 01:04 AM
  3. Replies: 2
    Last Post: 03-25-2019, 12:59 AM
  4. Replies: 1
    Last Post: 02-06-2016, 05:30 AM
  5. Replies: 1
    Last Post: 05-19-2015, 01:59 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