Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Object Required Error 424 1

Status
Not open for further replies.

ZOR

Technical User
Jan 30, 2002
2,963
GB
I have a form with a subform. The subform is linked okay, when I select a record on the mainform I can see the subform respond (ID1)

I am trying to add a record in the subform, but it errors with Object required 424. It highlights the line

rsDocksLink.Fields("ID1") = TY?

I tried making it equal to the field ID1 value on the mainform, but it told me I could not do that as the mainforms table needed a related record. Any ideas, thanks

Subform Code

Dim rsDocsLink As Recordset
Dim db As DAO.Database

Set rsDocsLink = CurrentDb.OpenRecordset("DocsLink", dbOpenDynaset)

rsDocsLink.AddNew


TY = Forms!TapeLogs!DocumentsForm.Form.ID1
rsDocksLink.Fields("ID1") = TY
rsDocsLink.Fields("DocName") = DocNames
rsDocsLink.Update
 
Ooooh, egg on face. DocksLink instead of DocsLink.
 
Howdy ZOR . . .

For starters:
Code:
[blue][b]Change:[/b]
   Dim rsDocksLink As Recordset
[b]To:[/b]
   Dim rsDocksLink As [purple][b]DAO[/b][/purple].Recordset[/blue]


Calvin.gif
See Ya! . . . . . .

Be sure to see thread181-473997
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top