Passing two values to a form

A

Andrew Wilkins

I know how to pass one value to a form using a button:

stLinkCriteria = "[DepartmentAllocation]=" & "'" & Me![Combo142] & "'"

But how can I change this code to pass two values? For example, I want to
pass not just the DepartmentAllocation value but also the CustomerName value.
Both are from combo boxes called Combo142 (for DepartmentAllocation) and
Combo152 (for CustomerName) respectively.

Can this be acheived?
 
A

Allen Browne

Assuming that the Bound column of both combos refers to a Text type field:

stLinkCriteria = "([DepartmentAllocation]=""" & Me![Combo142] & _
""") AND ([CustomerName] = """ & Me.Combo152 & """)"
 

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