Results 1 to 4 of 4
  • Thread Tools
  1. 2 Star Lounger
    Join Date
    Nov 2001
    Posts
    192
    Thanks
    0
    Thanked 0 Times in 0 Posts

    how to find a record that is a number (Access 2000)

    Can somebody help me with the code for finding a record by typing its number.I have a table of products.
    and each product has an unique number.The first Record is called ProductID.What i need is a command aksing me the number of the product (ProductID) and then finding it. I have looked through some examples of FindFirst in the books,but i am afraid they are already obsolete.

  2. 3 Star Lounger
    Join Date
    Mar 2001
    Location
    Frederick, Maryland, USA
    Posts
    296
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: how to find a record that is a number (Access 2000)

    Assuming your records are in a table, have you tried Edit, Find from the main command bar?

  3. Silver Lounger
    Join Date
    Aug 2001
    Location
    Frederick, Maryland, USA
    Posts
    1,783
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: how to find a record that is a number (Access 2000)

    Assuming you are launching your search from a Form, you could create a parameter query that launches when a form is opened or you press a Command button you create that will ask you for the Unique ID. The Parameter Query would then pass back the data you are looking for.
    Gary

  4. Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: how to find a record that is a number (Access 2000)

    I would use a combo box in the header or the footer of the form with the ProductID.
    In the After Update of the Combo box :
    <pre>Private Sub cmbProductID_AfterUpdate()
    On Error GoTo PROC_ERR
    DoCmd.GoToControl "ProductID"
    DoCmd.FindRecord cmbProductID, , , acSearchAll, , acCurrent
    Exit Sub
    PROC_ERR:
    MsgBox "There was an error : " & Error$
    Resume Next
    End Sub
    </pre>

    This assume you name your combobox cmbProductID, you have a textbox named ProductID on the form.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •