[AccessD] CBO Not In List

Tony Septav iggy at nanaimo.ark.com
Thu Oct 2 12:12:13 CDT 2003


Hey All
Hope this is of some help.

If you use the On Change event of the combo box you can check to see if
the info typed in exists
.

Simple example

Dim Db as database
Dim Rst as recordset
Dim Sql as string

sql="select store from company where store=""" &  me!mycombo.text & "*"
& """;"

set db=currentdb()
set rst=db.openrecordset(sql,dbopendynaset)

if rst.recordcount=0 then
    docmd.beep
endif

rst.close





More information about the AccessD mailing list