Hi there pips
I've created two table(T1 and T2) and i want to link them.one table have the two fields(No.which is a Code10 and name filed Option) on T2 i have (customer No. (code10),No.(Code10),Name(option) and other fields) i have 2 forms for both of them(F1 and F2).The table relation on T2
T2."No." WHERE (Name=FIELD(Name)).
On F2 when i'm on the "No." i need to lookup T1 and its not working.
I have the following code on Onvalidate and OnLookup of T2
IF "Customer No." = COPYSTR("Shearing Shed No.",1,6) THEN
VALIDATE("Main Shed",TRUE)
ELSE
"Main Shed" := FALSE;
Which validates other fields
0
Comments
The fact that there is some code, makes it that the standard onlookup is NOT triggered. (You may NOT even put some documented line on the trigger!).
The Validate-trigger will be run when you leave the field after selecting a value with the lookup.
PS don't forget the LookupFormID-property on the table in which you want to select a value.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
Put code only in onValidate() trigger.
OK ... This will be quicker:
(2 basics examples of using LookUP)
Just import it and see how does it work.
1. I just notice, that it should be (in my opinion):
T1."No." WHERE (Name=FIELD(Name)).
Because it was on T2.
2. Check lookup property of this column at the form. You should have <No> (Default Value) or YES, otherwise You will not see lookUp button.
3. If You can post table and form at this forum (or just the form - I know that this is not always possible). I will try to check then what can be wrong (as quickly as I will be able to do it).
thanks for your troubles,i've got it correct,what i have done is delete the code in the Onlookup button(It didn't work because i've just commented it out)then i deleted it and it works =D>
Thanks again!!!
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!