When I execute the following query in a subroutine called by a double click on a child record in a parent-child (one to many form) I get a Runtime error 3601. Too few parameters. Expected 1.
Code:
strSQLString = "SELECT Enquiry.Customer_Name, Enquiry.Rooms " & _
"FROM Enquiry " & _
"WHERE [Enquiry.Enquiry_Number] = " & Me.Enquiry_Number
Set rs = CurrentDb.OpenRecordset(strSQLString)
Enquiry is the Parent table and "Enquiry_Number " is the joining field (master key in the Parent table "Enquiry")
So in fact I am trying to retrieve values from two fields in the parent table that are visible on the form (Customer_Name and Rooms) and I think this where the problem lies?