vr_RdSet.Open "SELECT [XXX] FROM [YYY] WHERE [XXX] IS NOT NULL " & _
"ORDER BY [XXX]", vr_Conn, adOpenStatic, adLockReadOnly
If Not vr_RdSet.EOF Then
With Combobox278
Set .Recordset = vr_RdSet
.Requery
End With
End If
vr_RdSet.Close
Set vr_RdSet = Nothing
ASKER
ASKER
ASKER
Microsoft Access is a rapid application development (RAD) relational database tool. Access can be used for both desktop and web-based applications, and uses VBA (Visual Basic for Applications) as its coding language.
TRUSTED BY
Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset
Dim sql As String
Set cn = New ADODB.Connection
cn.ConnectionString = "Provider=SQLNCLI;Server=U
"Database=faa;Trusted_Conn
cn.Open
sql ="SELECT [XXX] FROM [YYY] WHERE [XXX] IS NOT NULL " & _
"ORDER BY [XXX]"
Set rs = New ADODB.Recordset
Set rs.ActiveConnection = cn
rs.Open sql2
Set Combobox278.Recordsource = rs
HTH,
Daniel