Hello, I have two combo boxes (Document_ID and Requirement_ID). I am trying to populate the Requirement_ID box based on the selection made in the Document_ID box. To do this I have the following code:
Private Sub Document_ID_AfterUpdate()
Dim ListData As String
ListData = "SELECT [All Requirements].RequirementID,[All Requirements].[Document_ID] FROM [All Requirements] WHERE [All Requirements].[DocumentID] = " & Document_ID & ";"
Me!Requirement_ID.RowSource = ListData
End Sub
I have this placed in the AfterUpdate event in the Document_ID box. When I run the form I get:
"Run time error '438'" Objest doesn't support this property or method
The debugger points to the line:
Me!Requirement_ID.RowSource = ListData
Being a newer VB user, i really have no idea where to go from here. Any information would be helpful.
Thanks,
Jason
Private Sub Document_ID_AfterUpdate()
Dim ListData As String
ListData = "SELECT [All Requirements].RequirementID,[All Requirements].[Document_ID] FROM [All Requirements] WHERE [All Requirements].[DocumentID] = " & Document_ID & ";"
Me!Requirement_ID.RowSource = ListData
End Sub
I have this placed in the AfterUpdate event in the Document_ID box. When I run the form I get:
"Run time error '438'" Objest doesn't support this property or method
The debugger points to the line:
Me!Requirement_ID.RowSource = ListData
Being a newer VB user, i really have no idea where to go from here. Any information would be helpful.
Thanks,
Jason