One way to achieve this is with a relation from appointment to patients. If you have permanent relationships (like the ones you use for RI), putting the tables into the DataEnvironment will automatically draw the relation - in the WRONG direction, from parent to child. You usually need the relation from child to parent; in this case, from appointment to patients. Erase the relation and draw it again, in the correct direction.
HTH,
Hilmar.
>Sir if you do excuse me for a minute , i just wanna ask you all about my Appointment form that has a dataenvironment of Patients.Dbf and Appointment.Dbf Both of them are indexed in patientsno.
> In my form theres patient's number from Appointment.Dbf , patients name form Patients.Dbd and appointment date form Appointment.Dbf.
> I made a new property named tablename with value of appointment.dbf
> Now here's the code inside my next button:
>
> SELECT(THISFORM.TABLENAME)
>
> IF RECCOUNT() <> 0
> SKIP 1
> ENDIF
>
> IF EOF()
> MESSAGEB("LAST RECORD REACHED!",0+64,THISFORM.CAPTION)
> GO BOTTOM
> END IF
> THISFORM.REFRESH()
>
> SO IT DOEs work but only those field inside the appointment table moves and refresh, the name doesn't change . why is it like that? I want to have a form that whenever i control next , it shows the appointment date , patients number and the patients name. hope you guys could help me with this., thank you very much.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)