I have two text boxes that I am trying to lookup some information with. The information I need is based on two filled in text boxes.
I have two textboxes one called txtModelName, the other txtProblem on a form called frmServiceCalls
The table the info is coming from is tblPossibleSolution
I wrote a query that does work
Private Sub txtDescriptionofEvent_Exit(Cancel As Integer)
SELECT TblPossibleSolution.ModelName, TblPossibleSolution.Problem, TblPossibleSolution.Solution
FROM TblPossibleSolution
WHERE (((TblPossibleSolution.ModelName)=[Enter Model Name]) AND ((TblPossibleSolution.Problem)=[Enter Problem]));
End Sub
This gave me a syntax error is there a way of using a query in vba? If there a way of using info from the form to get the answer? In this case the info is based on the modelname and the problem.
I have two textboxes one called txtModelName, the other txtProblem on a form called frmServiceCalls
The table the info is coming from is tblPossibleSolution
I wrote a query that does work
Private Sub txtDescriptionofEvent_Exit(Cancel As Integer)
SELECT TblPossibleSolution.ModelName, TblPossibleSolution.Problem, TblPossibleSolution.Solution
FROM TblPossibleSolution
WHERE (((TblPossibleSolution.ModelName)=[Enter Model Name]) AND ((TblPossibleSolution.Problem)=[Enter Problem]));
End Sub
This gave me a syntax error is there a way of using a query in vba? If there a way of using info from the form to get the answer? In this case the info is based on the modelname and the problem.