Your post is confusing in that I don't see anything conditional about it. If
they will always be 3 and 5, then in the Load event of form 2
With Me
.combobox1 = 3
.combobox2 = 5
End With
If that is not what you want, please clarify your question and we can help.

Signature
Dave Hargis, Microsoft Access MVP
Your code with the "Where"is actually looking for a record that already exits
where the comboboxes are already set to 3 and 5, not setting the values of
the comboboxes. If Dave's guess is incorrect, and the 3 and 5 were just
examples of what the two variables may be, something like this will work,
remembering that the variable values must be available to your Command1 sub:
In your Form1
Private Sub Command1_Click()
DoCmd.OpenForm "Form2", , , , , , Variable1 & ";" & Variable2
End Sub
In your Form2
Private Sub Form_Open(Cancel As Integer)
If Not IsNull(Me.OpenArgs) Then
VarValues = Split(Me.OpenArgs, ";")
Me.ComboBox1 = VarValues(0)
Me.ComboBox2 = VarValues(1)
End If
End Sub

Signature
There's ALWAYS more than one way to skin a cat!
Answers/posts based on Access 2000/2003
Klatuu - 09 Apr 2008 16:49 GMT
I considered including almost exactly what you propose, but didn't only
because the OP did not really make it clear.

Signature
Dave Hargis, Microsoft Access MVP
> Your code with the "Where"is actually looking for a record that already exits
> where the comboboxes are already set to 3 and 5, not setting the values of
[quoted text clipped - 17 lines]
> End If
> End Sub