Open RecordSet at Specific Record
Posted on 2000-03-06
I created a master/detail datagrid, using the dataform wizard. I want the recordset to open up at a specific record based upon the master's primary key "c_num", this value is generated and passed using a global variable("client_num") from frm_Client_Info to the Master/Detail Form, frm_All_Client_Info. Line 01 was generated by the wizard, the rest is my unsuccessful attempt to move to the specific record automatically with the form load. The code does not generate any errors it just does not work.
Private Sub Form_Load()
(01) Set grdDataGrid.DataSource = datPrimaryRS.Recordset("ChildCMD").UnderlyingValue
Set db1 = OpenDatabase("C:\Database\Bacon.mdb")
Set link = db1.OpenRecordset("Clients")
Do Until link!c_num = client_num