Need Help With Small Code . .

Evagrius

Registered User.
Local time
Today, 15:11
Joined
Jul 10, 2010
Messages
170
Hi, I have the below sql in code. I've been tring to add a line where [building Number] is NOT NULL - but I can't seem to get it right. I created a query and tried to copy it - but my syntax is incorrect. I would be grateful for any help!! Thank you!


Code:
Rem POPULATE BUILDING LIST BOX BASED ON ORG CODE
strSource = "SELECT [Building Number] " & _
                   "FROM tblRatio " & _
                   "WHERE [Organization] = '" & Me.ListOrgCode & "' GROUP BY [Building Number] ORDER BY [Building Number]"
 
Code:
"SELECT [Building Number] " & _
"FROM tblRatio " & _
"WHERE [Organization] = '" & Me.ListOrgCode & "' And [Building Number] Is Not Null GROUP BY [Building Number] ORDER BY [Building Number]"
 
Thank You Bob!!
 

Users who are viewing this thread

Back
Top Bottom