Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Question about how pull a Data of combobox

Discussion in 'Information Technology' started by ldiaz, Oct 28, 2005.

  1. ldiaz

    ldiaz
    Expand Collapse
    Guest

    Hi all.
    I think it's pretty easy but I don't know why it does not work with me..I
    have made this question before but the answer it does not work.

    I want tu pull a data from a first Form to sencond form.
    the field in both first & second form are: Combobox
    Combo name in first form is:combo1
    Combo name in second form is:ud

    source of Combo1:
    SELECT Users.UserID, [LastName] & " , " & [FirstName] AS Name,
    Users.Password, Users.OrderPerson, Users.ApproverPerson,
    Users.ReceiverPerson, Users.AdminPerson, Users.Active FROM Users WHERE
    (((Users.Active)=Yes)) Or (((Users.Active)=Yes)) ORDER BY Users.Password;

    source of ud:
    SELECT Users.UserID, [LastName] & " , " & [FirstName] AS Name FROM Users;


    Here is the statements that I have but it does not work, could you help me
    please.

    Thanks.
    ldiaz
    ldiaz@safariland.com

    _______________________________________________________
    Private Sub OpenOrders_Click()
    On Error GoTo Err_OpenOrders_Click


    Dim stDocName As String
    Dim stLinkCriteria As String


    stDocName = "Orders" 'Data Base name

    stLinkCriteria = "[ud]=" & Me![Combo1].Column(1)


    DoCmd.OpenForm stDocName, , , stLinkCriteria





    Exit_OpenOrders_Click:
    Exit Sub

    Err_OpenOrders_Click:
    MsgBox Err.Description

    Resume Exit_OpenOrders_Click

    End Sub
    _______________________________________________________
     
  2. Loading...

    Similar Threads Forum Date
    Question About GGS Questions and Answers Aug 28, 2016
    Marriage And Discrimination Related Questions Blogs Mar 21, 2016
    Sikhi Questioning Faith Sikh Sikhi Sikhism Mar 3, 2016
    Entering into Sikhism: Questions on Reht Maryada. Blogs Oct 22, 2015
    A question about kes/hair? Blogs Oct 21, 2015

  3. Andy Couch - UK Access User Group

    Guest

    I am not sure if I fully understand your problem here. In that both your
    combo boxs appear to take data from the same table Users. But here is an
    example of linking to combo boxes on different forms together.

    On the first form called frmOrders

    You have a combo box called cboOrderId

    On the second form.

    You have a combo box displaying order details. The where clause links the
    tow together.

    SELECT [Order Details].ProductID
    FROM [Order Details]
    WHERE ((([Order Details].OrderID)=[Forms]![frmOrders]![cboOrderId]));

    Hope this helps.

    ________________________________________________
     

Share This Page