Trying to put job# picked in combo box from Main form into Subform

G

Guest

Below is the code I put in and there is an erro

Me![Job] = Forms!frmljncCleaning!cbojoblocautonum.Column(1)

I am trying to automatically fill in the job(number) in the subform based
off of what is selected in the combo box of the main form - the job number is
the second field in the combo box.

I am sure sytax is wrong somewhere - just not sure where??

Thanks,
Barb
 
G

Guest

What error are you getting?
Where is this line of code?

If it is in your subform, try:
Me!Job = Parent.cbojoblocautonum.Column(1)

Steve
 
G

Guest

No I am getting the below error with the suggested code

Invalid reference to the parent property

The combo box of jobsloacautonum is actually an unbound combo box the only
thing bound on the main form is the date. Would like to keep it unbound
since everything pretty much working just need to know how to reference it to
get the job automatically put into the subform job field.

Thanks again,
Barb




SteveM said:
What error are you getting?
Where is this line of code?

If it is in your subform, try:
Me!Job = Parent.cbojoblocautonum.Column(1)

Steve

babs said:
Below is the code I put in and there is an erro

Me![Job] = Forms!frmljncCleaning!cbojoblocautonum.Column(1)

I am trying to automatically fill in the job(number) in the subform based
off of what is selected in the combo box of the main form - the job number is
the second field in the combo box.

I am sure sytax is wrong somewhere - just not sure where??

Thanks,
Barb
 

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