What is wrong with this statement

violentjay25

Registered User.
Local time
Today, 17:11
Joined
Feb 22, 2005
Messages
30
I have a form that I want to pull data from 2 tables when a value is selected from the cboProjectName drop down box. Both tables have the field ProjectName in them and I want all the boxes on the form to display the data that correlates to the valule in the Combo box. The code is listed below


SELECT tbl_Projects.ProjectName AS [cboProjectName], tbl_Projects.SystemsImpacted AS [txtSystemsImpacted], tbl_Projects.SPRNum AS [txtSPR], tbl_Projects.ReleaseDate AS [txtReleaseDate], tbl_Projects.Status AS [cboStatus], tbl_Projects.CSIPM AS [txtCSI], tbl_Projects.BPM AS [txtBPM], tbl_Projects.Implemented AS [txtImplemented], tbl_Projects.StakeHolder AS [cboStakeholder], tbl_Projects.IBR1 AS [cboIBR1], tbl_Projects.IBR2 AS [cboIBR2], tbl_Projects.IBR3 AS [cboIBR3],tbl_Projects.Objective AS [txtObjective], tbl_Projects.SMERequirments AS [txtSMERequirements], tbl_Updates.Date1 AS [txtDate1], tbl_Updates.Memo1 AS [txtMemo1], from tbl_projects (inner JOIN tbl_Updates on tbl_Projects.ProjectName = tbl_Updates.ProjectName) WHERE ((tbl_Projects.ProjectName)=[Forms]![frmView]![cboProjectName]));
 
I'm not sure why you are using alias' for all the column names and you don't say what problem you have with the query but I'm going to guess that changing the join type from inner to left will fix the problem.
 

Users who are viewing this thread

Back
Top Bottom