Re: Display a record by key in a form




Richard,
 
Use the DataTable.Select method.  It'll return an array of row(s), which you can use to display on your second form. 
Your code will look something like this:
 
Dim myRows As DataRow() = dt.Select("PrimaryKeyField='porcupines'","SomeOtherField DESC")
 
HTH
 
-S.M. Altaf [MVP]




All that glitters has a high refractive index.
www.mendhak.com
 
How do I select and display a specific record in a form based on the key.  I
want to open a form from a separate form and display a desired record by
passing its key when opening the form but still enable the entire recordset
to be accessible by the Record Selector (i.e., not limit the record choices
to one record that is selected by a "Where" parameter) ?

Thank you for your help.

Richard


Relevant Pages

  • Values not displaying in second form after post.
    ... takes user inputted values such as fullname, city, address etc. ... values to display in the second form when it is called. ... on the input form page to correct errors or if there are no errors the user ... In the second form I have tried to display the values from the first form ...
    (comp.lang.php)
  • Re: How to read a pdf file with VB6?
    ... > Jacob wrote: ... >> What I'm looking is to read the pdf and display it on a separate form, ...
    (microsoft.public.vb.controls)
  • Re: ShowModal screen position
    ... sure how to actually display the form modally at a certain position on ... properties OnShow of the second form, so this would be after calling ... have the position property of the second form set as poMainFormCenter - ... form1.height before calling the showmodal. ...
    (comp.lang.pascal.delphi.misc)
  • Re: Availability of Control Value when updated from another form
    ... >>I am tring to display data on a second form based on a selected value in the ... >>Open FORM works fine (this code is run from the first form): ... >>second form (form2) that also works fine when clicked). ...
    (microsoft.public.access.formscoding)
  • Re: Need Urgent Help!!!
    ... Variable in VBA? ... the variable value to filter the form? ... To display on the second form? ...
    (microsoft.public.access.formscoding)