I have this running in a form to get mobile numbers from our users:
'************************************************************'* Fill Combo Box with moblie numbers
'************************************************************Function FillComboBox()
Set dbe = Application.CreateObject("DAO.DBEngine.36")
if Err.Number <> 0 then
msgbox err.description & " -- Some functions may not work correctly" & Chr(13) & "Please make sure that DAO 3.0 or greater is installed on this machine"
else
Set dbs = dbe.OpenDatabase("//zeus/mdb$/sms/" & "sendsms.mdb")
Set rst = dbs.OpenRecordset("Select telemovel, nome from nome_tel Order by nome")
Set ctl = Item.GetInspector.ModifiedFormPages("P.2").Controls("ComboBox1")
ctl.boundcolumn=1
ctl.columncount=2
ctl.textcolumn=1
ctl.ColumnWidths = "0 pt; 50pt"
CategoryArray(99, 2) = rst.GetRows(500)
ctl.Column() = CategoryArray(99, 2)
end if
End Function
--
Ricardo Silva [Outlook MVP]
Site -
www.rsoutlook.com
Vaughan said:
How can I get data from tables/queries in access into a form in Outlook?