Passing two values to a form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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?
 
Assuming that the Bound column of both combos refers to a Text type field:

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