Re: Dialog Form

From: PC Data*** (spam_at_nospam.spam)
Date: 02/18/04


Date: Wed, 18 Feb 2004 19:38:04 GMT

First you need a Products table that looks like:

TblProduct
ProductID
ProductName
etc

Your underlying form can then be bound to this table or a query based on the
table.

Your find form can then be a small popup form with a combobox based on a query
based on TblProduct sorted by Productname. Your query would include ProductID
and Productname. The bound column of the combobox would be 1, column count 2 and
column widths 0;2. Put the following code in the AfterUpdate event of the
combobox:
Me.Visible = False

Then put this code in the click event of your find button:
Dim Rst As DAO.Recordset
SetRst = Me.RecordsetClone
DoCmd.OpenForm "NameOfFindForm",,,,,acDialog
With Rst
    .FindFirst "[ProductID] = " & Forms!NameOfFindForm!NameOfComboboxOnFindForm
    Me.BookMark = .Bookmark
    .Close
End With
DoCmd.Close acForm, "NameOfFindForm"
Set Rst = Nothing

--
                                         PC Data***
Your Resource For Help With Access, Excel And Word Applications
                              resource@pcdata***.com
                                 www.pcdata***.com
"Dom" <anonymous@discussions.microsoft.com> wrote in message
news:1261f01c3f652$ebba4470$a001280a@phx.gbl...
> How can I create a form to prompt me for key information
> to find in a table which will display in an underlyign
> open form. I am tryign to create a find button which will
> bring up a dialog form asking for the desired  find
> information ie: product name, then find the info from the
> table boundto the form that opened the dialog?
>
> I've done this in prior versions of Access but no longer
> have accessto those databases to help me in this matter.
>
> help!