Referencing fields in subform

S

Sandy

I am attempting to reference the values in a subform - the main form is
"Finalise Jobs" the subform is "FinaliseJobDetailsSubform". I have tried the
following :-

"strMessage = strMessage & vbCrLf & "Repair Type - " _
& [Finalise Jobs].[FinaliseJobDetailsSubform]![cboCatName] _
& " Item - " & [Finalise
Jobs].[FinaliseJobDetailsSubform]![txtQuantity] & "x " _
& [Finalise Jobs].[FinaliseJobDetailsSubform]![cboRepProduct]"

but receive error :-

Number - "2465" and Description - "Microsoft Office Access can't find the
field '|' referred to in your expression."

Any suggestions?
Sandy
 
S

Sandy

Cracked it!

Finally found a web article that had the correct syntax. This works if you
are interested

strMessage = strMessage & vbCrLf & "Repair Type - " _
& Forms![Finalise Jobs]![FinaliseJobDetailsSubform].Form.cboCatName
& _
" Item - " _
& Forms![Finalise Jobs]![FinaliseJobDetailsSubform].Form.txtQuantity
& "x " _
& Forms![Finalise
Jobs]![FinaliseJobDetailsSubform].Form.cboRepProduct

Sandy
 

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