Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Problem Displaying Specific Record

Discussion in 'Information Technology' started by martin.ryan@esbi.ie, Jul 28, 2006.

  1. martin.ryan@esbi.ie

    Expand Collapse

    I have written this code below and it executes but does not do what I
    want it to do. What I want is the form "Sparesform" to open when I
    double click on the "index" field for the record I wish to view. The
    index field is part of a subform. What is happening at the moment is
    the form "Sparesform" is opening but does not go to the correct record
    but instead goes to, what appears to be a new record. My where
    condition of the code appears to be assigning the correct index number
    to "forms![sparesform]![number]" but this does not seem to be carried
    out when the sparesform is opened.

    Index is a numeric data type (ie its an auto number)
    Can you shine some light on my problem.

    Private Sub index_DblClick(Cancel As Integer)

    Dim stDocName As String, stLinkCriteria As String

    stDocName = "Sparesform"
    stLinkCriteria = "forms![sparesform]![Number] = " & Me![index]

    DoCmd.OpenForm stDocName, , , stLinkCriteria

    End Sub

    Martin R
  2. Loading...

    Similar Threads Forum Date
    Sikh News Sikhs Face Problems While Carrying Kirpans In Khyber-Pakhtunkhwa - SikhSiyasat.Net Breaking News Jul 29, 2016
    "Dasam" Granth - A Look At The Core Problems Dasam Granth Aug 17, 2016
    Problems In Life Sikh Sikhi Sikhism Apr 13, 2015
    How Can I Make Decent And Useful Friends And From Where ? Most People Have A Problem With Me Sikh Youth Oct 23, 2013
    The Problem With Taking Too Many Vitamins Health & Nutrition Oct 18, 2013

Since you're here... we have a small favor to ask...     Become a Supporter      ::     Make a Contribution     

Share This Page