Welcome to SPN

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

Sign Up Now!
  1.   Become a Supporter    ::   Make a Contribution   
    Target (Recurring Monthly): $200 :: Achieved: $98

Question about how pull a Data of combobox

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

  1. ldiaz

    Expand Collapse

    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


    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 Sub

    MsgBox Err.Description

    Resume Exit_OpenOrders_Click

    End Sub
  2. Loading...

    Similar Threads Forum Date
    Anyone Have Any Unanswered Questions On Sikhi Or God? Sikh Sikhi Sikhism Jan 7, 2017
    Question About Translations Questions and Answers Dec 20, 2016
    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

  3. Andy Couch - UK Access User Group


    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.

Since you're here... we have a small favor to ask...

More people are visiting & reading SPN than ever but far fewer are paying to sustain it. Advertising revenues across the online media have fallen fast. So you can see why we need to ask for your help. Donating to SPN's is vote for free speech, for diversity of opinions, for the right of the people to stand up to religious bigotry. Without any affiliation to any organization, this constant struggle takes a lot of hard work to sustain as we entirely depend on the contributions of our esteemed writers/readers. We do it because we believe our perspective matters – because it might well be your perspective, too... Fund our efforts and together we can keep the world informed about the real Sikh Sikhi Sikhism. If everyone who writes or reads our content, who likes it, helps us to pay for it, our future would be much more secure. Every Contribution Matters, Contribute Generously!

    Become a Supporter      ::     Make a Contribution     

Share This Page