Normal Topic Problem with Subform (Read 686 times)
Amor
Full Member
Members
***
Offline


No personal text

Posts: 366
Location: Germany
Joined: Feb 7th, 2004
Problem with Subform
Jun 8th, 2005 at 12:50pm
Print Post Print Post  
Hello All
I have a programming Problem with Subform
I have the following databases in Application Medizin-Labor

Chemie
ChemieItems (Subform)
ChemieNormWerte
Customers

In Customers i have Profile keyword field (Items a semi-colon separated list of the item numbers for each Customer).

in Orders, once i select a Customer, i use Xlookup to get the Profile value for that Customer. Now i have a StringArray.
a Loop uses AccessStringArray to get each item in turn. For each item, Xlookup then name, price.. for that item.
The @FormNewRecord creates a line subrecord for each item.

I have a programming Problem with placing the items in the Subform. Empty fields im Subform but the lines are created!

Here is the program

var ParameterList as String
var countinList as int
var loop as int
var nn as int
var vEinheit
var vKode as String
var vParameter as String
var vNormwert as String

ParameterList =  @XLU(@FN, CustomerKey  , "Customers!Key", "Profil")

countinList = @countStringArray (ParameterList)

// loop through all elements

loop =1

while (loop <= countinList)

{
  vKode = @AccessStringArray (ParameterList, Loop)

   nn =  @FormNewRecord ("ChemieItems")

 FormFieldValue ("ChemieItems", vKode , nn, "Widget")

  vParameter = @XLU (@FN; vKode; "ChemieNormWerte!Kode";"Parameter")
       vEinheit  = @XLU (@FN, vKode, "ChemieNormWerte!Kode";"Einheit")
   vNormwert = @XLU (@FN; vKode; "ChemieNormWerte!Kode";"Normwert")

// * Note : i think hier is the Problem !

* Parameter  = v Parameter
*       Einheit = vEinheit
* Normwert = vNormwert

@color(ThisElement,3, 8)

 loop = loop + 1
}

thank you for any help
from Germany
Dr. Belhareth

???
« Last Edit: Jun 8th, 2005 at 9:43pm by Amor »  

Dr. med. Amor Belhareth&&Medizin Labor &&Germany
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2480
Joined: Aug 20th, 2003
Re: Problem with Subform
Reply #1 - Jun 10th, 2005 at 1:27pm
Print Post Print Post  
Hello Dr. Belhareth,

You need to tell Sesame to place the information on the subform using FormFieldValue(). An untested example of this would be...

Code
Select All
FormFieldValue ("ChemieItems", "Parameter" , nn, vParameter)
FormFieldValue ("ChemieItems", "Einheit" , nn, vEinheit)
FormFieldValue ("ChemieItems", "Normwert" , nn, vNormwert ) 



-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
Amor
Full Member
Members
***
Offline


No personal text

Posts: 366
Location: Germany
Joined: Feb 7th, 2004
Re: Problem with Subform
Reply #2 - Jun 11th, 2005 at 8:14pm
Print Post Print Post  
Ray,
Thanks and Thanks once again!
It works fine.
  

Dr. med. Amor Belhareth&&Medizin Labor &&Germany
Back to top
 
IP Logged