Our example below uses a table 'tblFriends' in an Access database 'Friends.mdb'.
Our example below uses a table 'tblFriends' in an Access database 'Friends.mdb'. The table has 3 columns, firstly an 'ID' field which is an autonumber, secondly a field called 'FirstName' which is a textfield and lastly another textfield called 'SurName'.
Our SQL statement uses the wildcard % and looks for those records where the FirstName's first letter begins with a T and populates the drop down with the records returned. If the form has not been submitted then the dropdown list will be displayed and if it is submitted then the selected option will be displayed.
If there are no records that begin with the T (i.e. If oRecordset.Eof) then the drop down Box will show "No Suitable Options" and if submitted the page will display "No suitable option was selected."