I don't know why you're using DDE... there is a new API available: here is some code form an actual working program using the seek function to locate the record.
lnReturnValue = GMW_DB_SetOrder(lnCont2Handle, 'CONTACT2' )
IF GMW_DB_Seek(lnCont2Handle ,lcAcctNo )<> 1
ENDIF
>Hi there.
>
>Up 'til now all integration I have done between Goldmine and VFP has
>been just moving data across via the GMAPI. Now I have a request to find a contact
>record in the Goldmine sql database, and the show that record in Goldmine so that
>the Goldmine app and the VFP app are working together.
>
>Using the DDE samples ... these conveniently do not show an example that uses the
>seek subfunction. :-<
>
>I have used many variation of the following code, but my seek to find a contact
>record always fails.
>
>If you can help me solve the Goldmine quirk I would be greatfull.
>
>TIA, Scott Barker
>
>========================
>
>lChannel = DDEInitiate("GoldMine", "Data")
>sRet = DDERequest(lChannel, "[RecordObj(SetObject, 0)]")
>sRet = DDERequest(lChannel, "[RecordObj(SetRecord, Contacts)]")
>sRet = DDERequest(lChannel, "[RecordObj(SetOrder, CONTNAME)]")
>** sRet is = to 1 after the above line..
>go_Acct = ["W"]
>
>test = DDEREQUEST(lChannel, "[RecordObj(Seek,"+go_acct+")]")
>** Test always returns 0
>
>** This one actually works .. but I dont wan't and can't to lookup on phone#!!
>sRet = DDERequest(lChannel, "[CallerID(" + CHR(34) + '(604)555-1234' + CHR(34)+")]")
>
>DDETerminate (lChannel)
>