Dim db As ADODB.Connection
Dim tblRst As New ADODB.Recordset
Set db = CurrentProject.Connection
Set tblRst = New ADODB.Recordset
tblRst.Open "tblMeterEntry", db, adOpenKeyset,
adLockOptimistic, adCmdTableDirect
strBuilding = "[Building]= '" & strBuilding & "'"
strUtility = "[Utility]= '" & strUtility & "'"
strBuilding = strBuilding & strUtility
tblRst.MoveFirst
If tblRst.EOF Or tblRst.BOF Then
Exit Sub
Else
End If
Do Until tblRst.EOF
strMeter = tblRst.Fields("meterNumber")
With lstMeterNo
.RowSource = " "
.RowSourceType = "Value list"
.AddItem strMeter
End With
tblRst.MoveNext
Loop
Set db = Nothing