sql in vba

Pete Morris

Registered User.
Local time
Today, 20:49
Joined
Mar 31, 2003
Messages
38
I am trying to use this code in vba as cascading combo boxes.
It allows me to select an item in the first cbx, but when I click on the second cbx a parameter qry pops up. selecting ok or cancel allows you to continue with the second cbx, but there are no values in it.
Any ideas on what could be wrong with this?

Private Sub ClientName_AfterUpdate()
Dim strSQL As String
strSQL = "Select " & Me!ClientName
strSQL = strSQL & " FROM TblClientNameLookup"
Me!cboProjectCode.RowSourceType = "Table/Query"
Me!cboProjectCode.RowSource = strSQL
End Sub

Thanks, Pete.
 
Why don't you just do it with queries? Believe me, it's better and more efficient.
 
how would you do that then?
 
One way is to type Cascading Combo Boxes in the Search page.

It return 187 entries for me.

Dave
 

Users who are viewing this thread

Back
Top Bottom