Results 1 to 8 of 8
  1. #1
    gemadan96 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Oct 2012
    Posts
    110

    DLOOKUP issue

    I have a form for Registration Details based on my Registrations Extended query. I've placed an unbound control in the form header. I want it to return the name of the tournament associated with the open registration. In the detail area of the form is a control for the tournament called TID that comes from the Registrations Extended Query. It is not visible in form view.



    I have set the Control Source for the unbound control as follows:

    =DLookUp("Tournament Name","Tournaments Extended","TID =" & [TID])

    This returns #Error so obviously I'm stating the criteria incorrectly.

    Any suggestions?

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,641
    The names with inadvisable spaces in them likely need to be bracketed. You're treating TID as a numeric data type; is it?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    gemadan96 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Oct 2012
    Posts
    110
    I modified the query name and the field name to remove the space then modified the epression to:

    =DLookUp("TournamentName","TournamentsExtended","T ID=" & [TID]) and now it works.

    TID is a numeric data type.

    Thanks.

  4. #4
    gemadan96 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Oct 2012
    Posts
    110
    I also have a split form called Registration List. It has a button to select a saved filter to show. The filters are saved in a table named filters.

    I would like to do something similar and display the name of the filter in the form header. I've started with this:

    =DLookUp("[Filter Name]","Filters","ID=" & [ID])

    The problem is there is no control on the form to identify the active filter ID. Can I create a control on the form to identify the active filter? I would be setting its visible property to no.

    The Select Filter button has an embedded macro that runs code that is in a saved macro.

  5. #5
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,641
    You're applying a filter to the form? It should be available in code:

    Me.TextboxName = Me.Filter
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  6. #6
    gemadan96 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Oct 2012
    Posts
    110
    It's a split form with a datsheet on the bottom. It lists all the registrants. It has a button control to select saved filter. The filters can be used to view all registrants for a particular event or the user can save a new filter after they have filtered the data to their liking. It came from the Asset Management template available from Microsoft.

  7. #7
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,641
    Not familiar with it, but did you try using the Filter property?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  8. #8
    gemadan96 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Oct 2012
    Posts
    110
    Not sure where to enter the filter property.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Dlookup issue
    By brharrii in forum Programming
    Replies: 3
    Last Post: 06-22-2012, 07:08 PM
  2. Dlookup annoying issue
    By Lupson2011 in forum Forms
    Replies: 8
    Last Post: 02-14-2012, 08:28 AM
  3. DLookup issue
    By seth1685 in forum Programming
    Replies: 5
    Last Post: 01-12-2012, 08:55 AM
  4. Easy DLookup Issue
    By Niki in forum Access
    Replies: 7
    Last Post: 05-25-2011, 03:00 PM
  5. Tough form issue that uses DLookup's
    By Solola in forum Forms
    Replies: 3
    Last Post: 03-15-2011, 01:25 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums