Improve company productivity with a Business Account.Sign Up
Private Sub GetLocations()
Dim db As Database
Dim rs As Recordset
Dim i As Integer
i = 0
sql = "SELECT LocationID, LocationType, LocationName, ProjectID "
sql = sql & "FROM Location "
sql = sql & "WHERE ProjectID = " & Me.cboProjectID.Column(0) & " "
Set db = CurrentDb
Set rs = db.OpenRecordset(sql)
Me.cboLocation.RowSource = ""
If Not rs.EOF Then
Me.cboLocation.Locked = False
Do Until rs.EOF
Me.cboLocation.AddItem Item:=rs![LocationID] & ";" & rs![LocationName] & ";" & rs![LocationType], Index:=i
i = i + 1
Open in new window
Squarespace’s all-in-one platform gives you everything you need to express yourself creatively online, whether it is with a domain, website, or online store. Get started with your free trial today, and when ready, take 10% off your first purchase with offer code 'EXPERTS'.
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
Please enter a first name
Please enter a last name
Must be at least 4 characters long.
Join and Comment
From novice to tech pro — start learning today.
Premium members can enroll in this course at no extra cost.