sql query run ok but in the form I got #error flickering

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • simtari
    New Member
    • Jan 2011
    • 2

    #1

    sql query run ok but in the form I got #error flickering

    It is made of 2 tables and a query and a form
    The sql is as follow:
    SELECT Client1.TableID , Sum(NZ(Client1. Seat,0)) AS USeat, (NZ([Tables Event 1].Seats,0)-Sum(NZ(Client1. Seat,0))) AS VSeat, [Tables Event 1].Seats, IIf([Reserved]="YES","R",I If([VSeat]=0,"F",IIf([USeat]=0,"V",IIf([VSeat]>0,"P","?"))) ) AS Status
    FROM [Tables Event 1] INNER JOIN Client1 ON [Tables Event 1].ID=Client1.Tab leID
    GROUP BY Client1.TableID , [Tables Event 1].Seats, [TablesEvent1 Extended].USeat, [Tables Event 1].Reserved;
    In the forms the control source of the field Status is as follow: =DLookUp("[Status]","[TablesEvent1 Extended]","[TableID]=[Form]![ID]")
    what I am missing here?
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    It's Forms!FormName! FormControlName

    Comment

    • simtari
      New Member
      • Jan 2011
      • 2

      #3
      Thanks for your reply
      I Changed the source control to =DLookUp("[Status]","[TablesEvent1 Extended]","[TableID]=Forms![TablesEvent1]!ID") and still having the same result.
      please any other suggestion

      Comment

      • Rabbit
        Recognized Expert MVP
        • Jan 2007
        • 12517

        #4
        The query runs fine? And you're trying to DLookUp something from the query right?

        What's the recordsource of the form?

        Comment

        Working...