>Hello:
>
>I have a table that includes sin,name, address, etc (name_add)
>and is indexed on sin, the parent table is client and is indexed on sin.
>
>When I enter I want the form's textboxes to display the name, surname, etc.
>from name_add but when I enter a sin(that's in both tables) the name_add sticks on the first record of name-add but doesn't select the correct name.
>
>I have selected the table name-ADD in the activate of the form.
>What do I need to do to get this to display properly?
>
>Any input would be appreciated. THankyou.
First, do you have
set relation to sin into name_add? Next, are you entering a SIN in a textbox for locating and displaying? If so, in the LostFocus of that text box, you need to do a SEEK on the Client table in order to find the correct record. Then add a THISFORM.REFRESH to display the Name_Add data. The LostFocus code would be:
local lnSIN
lnSIN = alltrim(This.Value)
select Client
seek lnSIN
if eof()
locate
endif
ThisForm.Refresh()
Mark McCasland
Midlothian, TX USA