tfurnivall
Registered User.
- Local time
- Today, 11:32
- Joined
- Apr 19, 2012
- Messages
- 81
Hi
I have a form with several objects:
Projects -> which have Sources -> which have SourceTypes
The underlying DB has tables for Projects, Sources and SourceTypes:
	
	
	
		
So, I'm trying to get all the Sources for a given ProjectID, and I'm using the following SQL statement:
	
	
	
		
What actually happens is that Access jumps in and says (via a Message Box) "Give me a value for Source.ProjectID.
I've just done that in the SQL statement!
How do I get a 'real' SELECT to work for the RowSource?
Tony (rapidly reducing his head to red pulp on the closest available wall)!
 I have a form with several objects:
Projects -> which have Sources -> which have SourceTypes
The underlying DB has tables for Projects, Sources and SourceTypes:
		Code:
	
	
	Table Projects;
Fields:
      ProjectID : AutoNumber;
      etc, etc
Table: Sources;
Fields:
      ID : Autonumber;
      ProjectID : Long;
      Sequence: Long;
      Name: String
      Type: SourceType       ' A different class, see below
      etc, etc
Table: SourceTypes;
Fields:
      ID : AutoNumber;
      Name: String;
      NameSpace : string;
      etc, etc
		Code:
	
	
	SELECT ID, ProjectID, Sequence, Name from Sources WHERE [Sources].ProjectID= MyProject.ProjectID;
[I]Which actually gets coded (because MyProject.ProjectID is a variable) as:
[/I]
"SELECT ID, ProjectID, Sequence, Name from Sources WHERE [Sources].ProjectID= " & MyProject.ProjectID & ";"I've just done that in the SQL statement!
How do I get a 'real' SELECT to work for the RowSource?
Tony (rapidly reducing his head to red pulp on the closest available wall)!
 
	 
 
		