I have written two queries inside the a method, where the output of the one query is fed as an input to another query. I tried passing the result(int) into the WHERE clause of the second query, but i'm getting the syntax error.

Below is my code:

```
Private Sub ComboBox1_Change()

On Error GoTo UserForm_Initialize_Err
Dim cnn As New ADODB.Connection
Dim rst As New ADODB.Recordset
Dim result As Integer

cnn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
         "Data Source=C:\Users\inkapb\Desktop\EPC Database\EPC TOOL.mdb"
rst.Open "SELECT [Project_Id] FROM [Project Details] WHERE [Project Name] = '" & Me.ComboBox1.Value & " ' ;", _
         cnn, adOpenStatic
'rst.MoveFirst

result = rst.Fields(0)
rst.Close

'Here in the below query i want to pass the result of the first query into WHERE clause

rst.Open "SELECT [Product Name] FROM [Project Details] WHERE [Project_Id] = ;" & result, _ 
         cnn, adOpenStatic
rst.MoveFirst

With Me.ComboBox2
    .Clear
    Do
        .AddItem rst![Product Name]
        rst.MoveNext
    Loop Until rst.EOF
End With
UserForm_Initialize_Exit:
On Error Resume Next
rst.Close
cnn.Close
Set rst = Nothing
Set cnn = Nothing
Exit Sub
UserForm_Initialize_Err:
MsgBox Err.Number & vbCrLf & Err.Description, vbCritical, "Error!"
Resume UserForm_Initialize_Exit

End Sub

```

Could anyone help me to achieve this
Any help is appreciated!