Populate Subform on Click of Combo Box

  • Thread starter Alan Beber via AccessMonster.com
  • Start date
A

Alan Beber via AccessMonster.com

I’m using a combo box on my main form to pick a company name. Once that name
is selected my subform is populated with fields from my checklist table.

My Problem: I’m trying to populate the subform with the joborder number from
the main form, but I’m getting an error.

Here’s my code after update of the combo box, to populate the subform with
the joborder number from the mainform:

Forms![frmDE]![sfrmCkList].Form![JobOrder] = Me.JobOrder

Thanks,
Alan
 
S

Steve Schapel

Alan,

It seems strange that you have used the Me keyword to refer to the
active form on one side of your statement and not the other. Try it
like this...
Me.sfrmCkList.Form![JobOrder] = Me.JobOrder

Still, I doubt that that is the cause of the problem. What is the
nature of the relationship between the data in the parent form and the
subform? Do you have anything entered for the Link Master Fields and
Link Child Fields properties of the subform? What is the error message
you are getting? What is the other code on the After Update event of
the combobox? In any case, the code will only apply to the current
record on the subform... is that what you intended? Your code may need
to explicitly set the focus to the subform so that there is a current
record.
 

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