Topic: To pull out some columns sql-inquiry on VBA under intersected conditions of sampling
The code a little altered (Produces an error: the Erratic either passed reserved keyword or argument in instruction SELECT or an incorrect punctuation):
Private Sub Kombinirovannaja3_AfterUpdate ()
Dim b As String
b = "SELECT Chiefs. A surname," and _
"Employees. A surname," and _
"FROM Chiefs" and _
"INNER JOIN Employees" and _
"ON Chiefs. Department = Employees. Department = '" both Me.3.Value and "'"
Me. RecordSource = b
In what there can be an error?