I have basically the same problem... (and I'm a Newbie). I have a sub-form that is being filtered based on the combo boxes available. The underlying query is straight forward for most selections... meaning the fileds are contained in a single table; no issues there. In one combination, the key field, status, is in a "related" table and a join is required. When that happens, the Project data is not editable.
MyCode when "only Active" is selected:
It gets the right data, but I can't update the data in the Table "Projects" but I can update the data in the Table "StatusRepo rts" which contains all of the Status' for a given project. I want to reference the last status, hence the Query "LastStatusDate s".
The later query contains a "Max" function on the date.
This code, written by someone else, did work, but apparently I've messed it up. I tried adding "Me.OrderBy On = True" ahead of this code, but no luck...
I hope I was clear. Any help would be awesome.
Thanks in advance
MyCode when "only Active" is selected:
Code:
Me.RecordSource = "SELECT Projects.* FROM _ (Projects INNER JOIN LastStatusDates ON _ Projects.ProjectID = LastStatusDates.ProjectID)INNER JOIN StatusReports _ ON (Projects.ProjectID = StatusReports.ProjectID) AND _ (LastStatusDates.Last_Status_Date = StatusReports.StatusDate) _ WHERE (((StatusReports.Status)='active')) _ ORDER BY Projects.ProjectID"
The later query contains a "Max" function on the date.
This code, written by someone else, did work, but apparently I've messed it up. I tried adding "Me.OrderBy On = True" ahead of this code, but no luck...
I hope I was clear. Any help would be awesome.
Thanks in advance
Comment