Thanks for the help guys! Much appreciated.
Steve
"Mark Grizzle" wrote:
[Quoted Text] > Use the lost focus event for the control to open a recordset to seach for > the bol number. Psuedo code follows... > > Sub field_lost_focus > > On error goto LocalError > > Dim cnn as adodb.connection > Dim rs as adodb.recordset > Dim sql as string > > Sql = "select count(1) from bol_table where bolfield = '" & me.bolnumber & > "' " > > 'load an ado connection > > Rs.open sql, cnn > > If rs.fields(0) = 1 then > 'record found > Else > 'record not found > End if > > Rs.close > Set rs = nothing > > ExitHere: > exit sub > > LocalError: > 'handle error > resume exithere > > End sub > > Hope this helps, > mark > > On 12/9/08 11:16 PM, in article > E2CA086D-199C-4B08-8CD7-6759EDD2D8EE[ at ]microsoft.com, "Steve in MN" > <SteveinMN[ at ]discussions.microsoft.com> wrote: > > > I have a form where user enters a BOL number (bill of lading) and on lost > > focus of that field i would like it to be able to go out and look at another > > table to see if that BOL is a valid number. > > Can someone give me an idea on how to do this? > >
|