The code below was working just as it should until I streamlined the database and updated with more stability. All of the fields that are need to run this report is available. The code is the control source for a financial report sent to the clients. Union query is need so that we can get all data from active records and archived records.
My problem now is that the report is showing records from one field in a totally different field, but when I go into the table to check to make sure that the data is in the correct field, it is. Now if you get rid of the union query it shows the data correctly. Any idea?
SELECT DISTINCTROW Projects.*, Mid([ProjectName],InStr([ProjectName]," ")+1) & ", " & Left([ProjectName],InStr([ProjectName]," ")-1) as LstFrst
FROM Projects WHERE (((Projects.ClientID)=forms!Clients![ClientID])); UNION SELECT DISTINCTROW aProjects.*, Mid([ProjectName],InStr([ProjectName]," ")+1) & ", " & Left([ProjectName],InStr([ProjectName]," ")-1) as LstFrst FROM aProjects WHERE (((aProjects.ClientID)=forms!Clients![ClientID]));
Sincerely,
Charles
My problem now is that the report is showing records from one field in a totally different field, but when I go into the table to check to make sure that the data is in the correct field, it is. Now if you get rid of the union query it shows the data correctly. Any idea?
SELECT DISTINCTROW Projects.*, Mid([ProjectName],InStr([ProjectName]," ")+1) & ", " & Left([ProjectName],InStr([ProjectName]," ")-1) as LstFrst
FROM Projects WHERE (((Projects.ClientID)=forms!Clients![ClientID])); UNION SELECT DISTINCTROW aProjects.*, Mid([ProjectName],InStr([ProjectName]," ")+1) & ", " & Left([ProjectName],InStr([ProjectName]," ")-1) as LstFrst FROM aProjects WHERE (((aProjects.ClientID)=forms!Clients![ClientID]));
Sincerely,
Charles