Update a field on the main from from a subform

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello and thanks for your attention...

Having a bugger of a time with this, I want to be able to update a field on
the main form with the selection I made with the subform.

I have tried this code...

Private Sub Combo10_AfterUpdate()

Me.AssetMainForm.AssetStatus = Me.Combo10.Column(5)

End Sub

but it does not know where AssetStatus is, what I think it is, is a text box
bound to the source field called AssetStatus.

again thanks
 
Just to make sure, you're saying that Combo10 is on the subform, and
AssetStatus is on the parent form?

Try:

Me.Parent.AssetStatus = Me.Combo10.Column(5)

or (assuming that the parent form is named AssetMainForm)

Forms!AssetMainForm.AssetStatus = Me.Combo10.Column(5)
 
That did it, think I must have tried a few different combinations, but that
was what I needed.

Thanks Douglas
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top