3 Replies Latest reply on Jun 18, 2012 6:04 AM by philmodjunk

    Problem Getting Correct Data

    BoydReilly

      Title

      Problem Getting Correct Data

      Post

      Tables being used:

      Machines (SerialNo, UserFirstName, UserLastName, UserID, ….)

      SerialNo (SerialNo)

      Clients (UserID, UserFirstName, UserLastname, UserID, …)

      There is a relationship form Machines.SerialNo to SerialNo.SerialNo.

      There is a relationship from Machines.UserID to Clients.UserID.

      In the body of the layout I have a pop-up displaying SerialNo.Serialno.  This lists all the records in SerialNo and when one is selected it goes to the correct record for Machines and displays the proper record.  No problem so far.

      In the layout I have the fields listed from the Machines record.  Here is when I run into a problem.  I have a pop-up menu that I am trying to assign a Clients.Userid into Machines.UserID.  In the pop-up menu I have these settings:

      Display Data from – Machines.UserLastName

      Values from – lastname (Sourse is From Field Clients.Lastname& Clients.FirstName)

      Here I can Machines.Lastname assigned from Clients.LastName.  But, I keep getting the Machines.FirstName and Machines.UserID from the first record in the Clients File instead of the record from I just selected.  How can I get the correct record information from Clients.

      Hope this make sense.

      TIA.

        • 1. Re: Problem Getting Correct Data
          philmodjunk

          when one is selected it goes to the correct record for Machines and displays the proper record.

          There is more than one way to do that. What method do you use?

          Is the layout based on machines or SerialNo? (What is selected in "Show Records From" in "Layout setup..."?)

          For your drop down, it would appear that it should be set up on Machines::UserID and enter the UserID. The first and last names can be displayed for "also use values from" second field and be taken from a calculation field in Clients that combines the values of the two name fields.

          • 2. Re: Problem Getting Correct Data
            BoydReilly

            Thanks for the response.  Works great. 

            2 additional questions, please.  Is there a way to not display the UserID?  I would rather just display UserLastName and UserFirstName. How can I display those 2 fields and just get the UserID?

            TIA.

            • 3. Re: Problem Getting Correct Data
              philmodjunk

              a) Use a pop up menu instead of a drop down list

              b) Put the calculation field from Clients that combines first and last names on top of the UserID field. Give it an opaque fill color and use behavior settings to prevent access to this field when in browse mode. This hides the UserID field behind the name field, but clicking on the name field deploys the drop down list--which will disappear back behind the nname field when you exit it.