This is a broad example that will hopefully get you started in the right direction. It's looking at a SQL Server database. To connect to Access you would change the connection string. Also to do this you must reference Microsoft ActiveX Data Objects Library.
Public Const ConnectionString = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;" _
& "Initial Catalog=PeopleData;Data Source=DOR-SRVR-DATA"
dim cn As ADODB.Connection
Dim rs As ADODB.Recordset
Set cn = New ADODB.Connection
cn.Open ConnectionString
Set rs = New ADODB.Recordset
rs.Open "Select LastName From Employee Where HairColor = 'Red'", cn, adOpenDynamic, adLockOptimistic
if not rs.eof
me.txtHairColor = rs.fields("HairColor"

endif
rs.close
set rs = nothing
cn.close
set cn= nothing
I hope this gets you started.
RKA