If you are asking about fields from two tables related to each other, here is an example. You can run this in \fwh\samples folder. This example uses two tables from that folder.
#include "FiveWin.Ch"
#include "ord.ch"
#include "xbrowse.ch"
REQUEST DBFCDX
FIELD STATE, CODE
//------------------------------------------------------------------//
function Main()
local oWnd, oBrw
RDDSetDefault( 'DBFCDX' )
if File( 'states.cdx' )
FErase( 'states.cdx' )
endif
USE STATES NEW EXCLUSIVE
INDEX ON CODE TAG CODE
SET ORDER TO TAG CODE
USE CUSTOMER NEW
SET RELATION TO STATE INTO STATES
GO TOP
DEFINE WINDOW oWnd
@ 0,0 XBROWSE oBrw OF oWnd ;
COLUMNS 'First', 'City', 'State' ;
FIELDS STATES->NAME ;
HEADERS ,,,'StateName' ;
ALIAS 'CUSTOMER' ;
CELL LINES
oBrw:CreateFromCode()
oWnd:oClient := oBrw
ACTIVATE WINDOW oWnd
CLOSE DATA
return ( 0 )
//------------------------------------------------------------------//
I have tested this code and it works. This is how it looks.
First three columns are from customer.dbf and the last column is from states.dbf