Opening Form Using Mutiple Values From Combos

  • Thread starter Thread starter Jamie
  • Start date Start date
J

Jamie

I am trying to open a form to view the results from
mutiple values from a combo box. Here is the Code:


Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "Closed Jobs1"


stLinkCriteria = "[Technician Username]=" & "'" & Me!
[Combo13] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria


At the moment it compares the value from the table
Technician Username with the Combo box Combo13 i would
like it to compare a value from another table and combo
box and show the results? Can this be done!
 
I am trying to open a form to view the results from
mutiple values from a combo box. Here is the Code:


Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "Closed Jobs1"


stLinkCriteria = "[Technician Username]=" & "'" & Me!
[Combo13] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria


At the moment it compares the value from the table
Technician Username with the Combo box Combo13 i would
like it to compare a value from another table and combo
box and show the results? Can this be done!

Just build a bigger stLinkCriteria string: e.g.

stLinkCriteria = "[Technician Username]=" & "'" & Me!
[Combo13] & "' AND [AnotherField] = " & [SomeOtherCombo]

If the field is Numeric you shouldn't have any delimiters; if it's
text, use quotemarks in the same way as the Technician Username.
 
Back
Top