Q: Access 'FindFirst' method > 1). The database field 'KeyField' is defined "YYYYWKMMDDHHMM". How can I find the first occurance of the Key Value "YYYYWK" using FindFirst or can I? I want the user to be able to go to any specific week in any year. Thanks rserrano; rserrano@webzone.net
A: I don't know if you have tryed the Left function of VB? Like this... (extract form the msaccess-section on the site) Dim rsList as recordset Dim dbDName as database Dim searchstring Set dbDName = opendatabase(yourdatabase) Set rsList = dbDName.openrecordset(yourtable) rsList.FindFirst Left([KeyField],6) = " & (searchstring) If Not rsList.Nomatch then 'show record Else rsList.FindNext End if see the site for more info about searching http://www.kather.net/VisualBasicSource/msa/ms7.html Return