Results 1 to 10 of 10
  1. #1
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Access Download on MSDN (2000)

    That's the normal syntax when you are filtering or ordering on a combo where the displayed data is not the same as the field in the form query, like when working with ID fields.
    Francois

  2. #2
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Alzano Lombardo, Italy
    Posts
    1,483
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Access Download on MSDN (2000)

    <img src=/w3timages/orangeline.gif width=33% height=2><img src=/w3timages/orangeline.gif width=33% height=2>
    That's the normal syntax when you are filtering or ordering on a combo
    <img src=/w3timages/orangeline.gif width=33% height=2><img src=/w3timages/orangeline.gif width=33% height=2>

    Are you talking about the BillTo combo box in the Orders form?
    <font color=ff69b4>Ciao</font color=ff69b4>

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

    Re: Access Download on MSDN (2000)

    Yes.
    The BillTo combo has as control source Orders.CustomerID.
    But when you enter the filter you can only see the Customer.CompanyName.
    So Access is using this special syntax to do a lookup to find the CustomerID in the Customer Table.
    This is been done automaticly when you filter on a combo, you don't have to enter this line.
    Francois

  4. #4
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Alzano Lombardo, Italy
    Posts
    1,483
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Access Download on MSDN (2000)

    <hr>This is been done automaticly when you filter on a combo, you don't have to enter this line.<hr>
    But how can I make Access automatically fill the Filter and Order By boxes in the Orders form Property sheet?
    <font color=ff69b4>Ciao</font color=ff69b4>

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

    Re: Access Download on MSDN (2000)

    you can do this by using the filtering buttons in the menu bar.
    If you want to set it in vba use:
    <pre>Me.Filter = "((Lookup_BillTo.CompanyName = 'Bottom-Dollar Markets'))"
    Me.FilterOn = True</pre>

    Or if you want to use the current contents of BillTo:
    <pre>Me.Filter = "((Lookup_BillTo.CompanyName = '" & Me.BillTo.Column(0) & "'))"
    Me.FilterOn = True</pre>

    Francois

  6. #6
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Alzano Lombardo, Italy
    Posts
    1,483
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Access Download on MSDN (2000)

    <hr>you can do this by using the filtering buttons in the menu bar.<hr>
    When the Orders form is in form view there's a "Filter Records" button in the Orders Form Toolbar which I suppose is the one that makes the changes in the Filter and Order By boxes in the Orders form Property sheet, but if you look at the attached picture, the On Action box is empty, so what makes the "Filter Records" button act upon being clicked?
    Attached Images Attached Images

  7. #7
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Access Download on MSDN (2000)

    The "Filter Records" button is actually a copy of the built-in Form Filter button; its style has been set to Text Only instead of Standard.

    The OnAction property of all built-in toolbar buttons is always displayed as empty - you can't see what action is associated with it.

    The OnAction property is used for custom toolbar buttons. In fact, the moment you put something in the OnAction property of a built-in button, it becomes a custom button.

  8. #8
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Alzano Lombardo, Italy
    Posts
    1,483
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Access Download on MSDN (2000)

    O.k. Hans.
    Since I don't see any "Order By" button, I suppose the "Order By" box of the Orders form property sheet has been filled manually, hasn't it?

  9. #9
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Access Download on MSDN (2000)

    The Orders Form toolbar contains the standard Sort Ascending and Sort Descending buttons (not quite sure about the captions in English, see attached picture). When you click one of these, the OrderBy property of the form is set. If you sort on a field displayed in a combo box, the OrderBy property will look like Lookup_... The OrderBy is saved when you close the form, so the next time you open it in Design view you will see it.
    Attached Images Attached Images

  10. #10
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Alzano Lombardo, Italy
    Posts
    1,483
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Access Download on MSDN (2000)

    Please take a look at the attached picture; it comes from the Orders form in the Orders.mdb file downloadable from MSDN.
    I can't make out what <big>"Lookup_BillTo"</big> in the Filter and Order By boxes of the Property sheet is.
    I can't find it in any of the object categories of the Database Window.
    Does anyone know what it is?
    Attached Images Attached Images

Posting Permissions

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