Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2004
    Posts
    2

    Unanswered: Help!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

    Aight guys, im a noob to Access.......

    This is the scenario.......

    Im looking at a record in a form which shows an ID that i wish to use as a search criteria......

    I want to use a command button so that it will use that value to search in another table and show that particular related record in another form..........

    Example...

    I got a record showing in FORMA...

    Name: Jo
    Address: 32 wallaby way
    OrderID: 3


    I want to create a command button that when pressed will show me the realted ORDER (in this case 3) in the order form.


    How would i do it?


    thanks guys!!!

  2. #2
    Join Date
    Mar 2004
    Posts
    2
    ANYONE PLEEEEEEEEEEEEEEEEZZZZZZZZZZZZZ

  3. #3
    Join Date
    Aug 2003
    Location
    Argentina
    Posts
    465

    Re: Help!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

    Originally posted by Shazy
    Aight guys, im a noob to Access.......

    This is the scenario.......

    Im looking at a record in a form which shows an ID that i wish to use as a search criteria......

    I want to use a command button so that it will use that value to search in another table and show that particular related record in another form..........

    Example...

    I got a record showing in FORMA...

    Name: Jo
    Address: 32 wallaby way
    OrderID: 3


    I want to create a command button that when pressed will show me the realted ORDER (in this case 3) in the order form.


    How would i do it?


    thanks guys!!!
    In your form make a command button with this code:

    Dim rst As Recordset
    Dim cadNombreBúsqueda As Integer
    Set rst = Me.RecordsetClone

    cadNombreBúsqueda = Me!YourOrderID

    rst.FindFirst "OrderID = " & cadNombreBúsqueda & ""
    If rst.NoMatch Then
    MsgBox "Record no Found "
    Else
    Me.Bookmark = rst.Bookmark
    End If
    rst.Close

    This code find the first record in the current form like Me!YourOrderID
    you must enter or put the OrderId in this control and then push the
    button.
    Saludos
    Norberto

Posting Permissions

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