Auto fill from a combo box

C

Cheryl

I'm not having luck with my code to auto fill a SpRepId field after selecting
the SpRepNam from a combo box in the form. Both are bound columns. The
column number refers to the second column in the combo box. I'm unsure about
why I'm getting an a compile error - invalid qualifier. I'm thinking it's
something obvious but sadly - not to me at this point as this doesn't look
any different from usual. Can you help? Here's my after update code

Private Sub SpRepNam_AfterUpdate()
On Error GoTo SpRepNam_Err

Dim DocName As String
DocName = "frmRepInfoHOwork"

DocName.SpRepid = DocName.SpRepNam.Column(1)

SpRepNam_Exit:
Exit Sub

SpRepNam_Err:
MsgBox Error$
Resume SpRepNam_Exit

End Sub
 

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

Top