Combo boxes and sub form

  • Thread starter Thread starter Erik Gjertsen
  • Start date Start date
E

Erik Gjertsen

I Have synchronize two Combo Boxes. That is going good. But I try to set inn
a subform I got problem.

The fist combo boxes name is master and the second is slave.
The name of the forms is LinkFRM.

SELECT IdentTBL.IdentID, IdentTBL.Fornavn, IdentTBL.Etternavn,
IdentTBL.TkNr, TkTBL.Tknavn, IdentTBL.Telefon, IdentTBL.Mobil
FROM TkTBL INNER JOIN IdentTBL ON TkTBL.TkNr = IdentTBL.TkNr;

I use followed procedure:


Private Sub slave_AfterUpdate()
Me.RecordsetClone.FindFirst "[TkNr]=" & Me![slave]
Me.Bookmark = Me.RecordsetClone.Bookmark

End Sub

And I got following error masages:
Runtime Error 7951
You entered an expression that has an invalid reference to the
RecordsetClone property.

Can someone help me??

Thanks
Erik Gjertsen
 
I have use following query in the second combo boxes
SELECT TkTBL.TkNr, TkTBL.Tknavn, TkTBL.FTKID
FROM TkTBL
WHERE (((TkTBL.FTKID)=[Forms]![LinkFRM]![master]))
ORDER BY TkTBL.TkNr;

Edward Lillis said:
The form must have a Record Source.

ed

Erik Gjertsen said:
I Have synchronize two Combo Boxes. That is going good. But I try to set inn
a subform I got problem.

The fist combo boxes name is master and the second is slave.
The name of the forms is LinkFRM.

SELECT IdentTBL.IdentID, IdentTBL.Fornavn, IdentTBL.Etternavn,
IdentTBL.TkNr, TkTBL.Tknavn, IdentTBL.Telefon, IdentTBL.Mobil
FROM TkTBL INNER JOIN IdentTBL ON TkTBL.TkNr = IdentTBL.TkNr;

I use followed procedure:


Private Sub slave_AfterUpdate()
Me.RecordsetClone.FindFirst "[TkNr]=" & Me![slave]
Me.Bookmark = Me.RecordsetClone.Bookmark

End Sub

And I got following error masages:
Runtime Error 7951
You entered an expression that has an invalid reference to the
RecordsetClone property.

Can someone help me??

Thanks
Erik Gjertsen
 
Back
Top