how to access correct record from separate form


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: how to access correct record from separate form

  1. #1
    Piercewe Guest

    how to access correct record from separate form


    I have two forms. One form one, there is an image along with info in a
    database that contains information about that image. On form two, I can
    also access the same image from the directory it is stored in. What I
    want to do, is double click on the image on form two, and have it switch
    to form one, and insert in each text box the information stored in the
    database.

    Right now, when I double click, it switches to form one, but it does
    not insert the record that pertains to the image into the
    appropriate text boxes.

    Could someone please show me an example of coding that could get
    me started down the right path..... every one tries to sell me another
    book, or tells me to study harder......I've did that, but can't seem
    to get it right. I understand about recordsets and stuff, but I need to
    see a coding example........please help....pretty please :-(


  2. #2
    Arthur Wood Guest

    Re: how to access correct record from separate form


    Piercewe,
    Do you have, in the record in your database, the EXACT directory path
    of the Image file? If not, then how do you tie the data in Form1 to the
    image file, from Form2 - That is to say, how can you be sure that for each
    image in the directoiry, you actually have information stored in the database?

    On the other hand, if you DO have the EXACT path of each image in the database,
    then when you chose the IMage from the directory(in form2) you can create
    a query of the database like this:

    Select * from PictureTable where ImagePath = '" & <fll path to the Directory
    Image> & "'"


    Arthur Wood



    "Piercewe" <piercewe@co.forsyth.nc.us> wrote:
    >
    >I have two forms. One form one, there is an image along with info in a
    >database that contains information about that image. On form two, I can
    >also access the same image from the directory it is stored in. What I
    >want to do, is double click on the image on form two, and have it switch
    >to form one, and insert in each text box the information stored in the
    >database.
    >
    >Right now, when I double click, it switches to form one, but it does
    >not insert the record that pertains to the image into the
    >appropriate text boxes.
    >
    >Could someone please show me an example of coding that could get
    >me started down the right path..... every one tries to sell me another
    >book, or tells me to study harder......I've did that, but can't seem
    >to get it right. I understand about recordsets and stuff, but I need to
    >see a coding example........please help....pretty please :-(
    >



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center