Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Populating one Combo Box from another

Status
Not open for further replies.

jvet4

Technical User
Jul 24, 2000
54
US
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
 
Jason - This has recently been answered in the following thread:

thread702-248555
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top