DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2004

    Parent child relationships on one form

    [Originally posted by Rich Meinert]

    I need to have a user fill in a text box on a form with an ID for a certain farm field , then I need the program to retrieve the value
    in the text box , use it to look up the most recent soil test result available from a data table so I can use the soil test data in a calculation to
    determine the fertilizer needed for the crop field.

    I can get the textbox.text input to retrieve the field but how do I go about using the value to look up the soil test info?

  2. #2
    Join Date
    Aug 2004

    Re:Parent child relationships on one form

    [Originally posted by Emerson Racca]

    First you must have a database. In that database, you must have a table or recordset or what MS calls now (in .NET terms) a dataset. This recordset must contain a primary field associated with the rest of the soil sample. Make a connection with that database using a DAO or RDO or ADO methodology, and "SEEK" or "SELECT" or whatever method you choose to locate the record of that soil sample. In any case, it is difficult to give you a code sample without first knowing some details such as the database name, recordset name, the recordset's fields, the type of connection that you are using to that database, etc.

  3. #3
    Join Date
    Aug 2004

    Re:Parent child relationships on one form

    [Originally posted by Rich Meinert]

    I am using ADO, the conections work for the bound text boxes. My datatables are
    [Plan Crop Records] and [Soil Test Results]. The logic for what I am attempting goes like this:

    THe user will enter a unique "FieldID" (a name or number) that refers to a specific crop field on trhe farm.
    That crop field will have one or more records in the [Soil Test Results] table (Access 2000) that contains the
    lab results from soil nutrient analysis tests. The link field is the "FieldID".

    I need the form to fill in the blanks of the table [Plan Crop Records] with the most recent data from [Soil Test Results] for the crop field "FieldID".
    I can put a text box on the form to get the user's input on which "FieldID" to work with but what event or method or something should I use to get the program
    to take the contents of the "FieldID" textbox and search the [Soil Test Results] table to return the data? Can this be automatic or do I need to have the user enter the "fieldID"
    in the text box and then click on a separate command button that has the code for the lookup?

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
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

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

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.