From: Box666 on
On 2 May, 03:42, "Dirk Goldgar" <d...(a)NOdataSPAMgnostics.com.invalid>
wrote:
> "Box666" <b...(a)mystical.demon.co.uk> wrote in message
>
> news:ba52c9b0-ac72-4831-b7ac-c4eee14a0fc4(a)p2g2000yqh.googlegroups.com...
>
>
>
> > ch ref no is unique - so no duplicates. The 2nd column is text only ax 20
> > char.
>
> No problem.  The RefNo field would be the primary key.  You could easily
> make a form, bound to the table, in which you key the refno you're looking
> for into an unbound text box, and then code in the text box's AfterUpdate
> event that locates the record that corresponds to the refno the user entered
> in the text box.  Code would look something like this:
>
> '------ start of example code ------
> Private Sub txtFindRefNo_AfterUpdate()
>
>     If IsNull(Me.txtFindRefno) Then
>
>         With Me.RecordsetClone
>             .FindFirst "RefNo = " & Me.txtFindRefNo
>             If .NoMatch Then
>                 MsgBox "RefNo " & Me.txtRefNo & " was not found."
>             Else
>                 Me.Bookmark = .Bookmark
>             End If
>         End With
>
>     End If
>
> End Sub
> '------ end of example code ------
>
> --
> Dirk Goldgar, MS Access MVP
> Access tips:www.datagnostics.com/tips.html
>
> (please reply to the newsgroup)

Great news, thank you very much