DBPRO - dbpGotoRecord - Forum

Forum Navigation
You need to log in to create posts and topics.

DBPRO - dbpGotoRecord

I have tried to use dbpGotoRecord to send a search to the correct table, but it does not work the way I had in mind.

" dbpGotoRecord "Album" "Birth" "[Album.Order.RecordNo]",

if the record is record as "10" it goes to the 10 line of the Birth record, that is record 19. The database has 4 tables:

Ordered Certificates, Birth Cert, Marriage Cert, Death Cert, all have the field RecordNo.

Is it possible to tell the search to read the field "RecordNo" from the Order table and show the RecordNo from the Birth table and not the 10th line.

@m-burdess

dbpGotoRecord is a navigational action, not a search or query action. When you tell it to go to record 10, it will go to the 10th record in the table.

You may look into dbpQuery and/or dbpDefineRelationship where you set a connection between the two tables.

luishp has reacted to this post.
luishp

@m-burdess

Is it possible to tell the search to read the field "RecordNo" from the Order table and show the RecordNo from the Birth table and not the 10th line.

SetVar "[desiredRecordNo]" ""[Album.Order.RecordNo]"
dbpQuery "Album" "Birth" "RecordNo= [desiredRecordNo]"
... check [Album.Birth.$RecCount] to make sure there was at least one matching record found

OR

SetVar "[desiredRecordNo]" ""[Album.Order.RecordNo]"
dbpFind "Album" "Birth" "RecordNo" "[desiredRecordNo]" "ExactMatch=Yes"

In either case, make sure both Tables have previously been dbpOpenTable'ed.