Results 1 to 5 of 5
  1. #1
    Join Date
    Nov 2010
    Posts
    29

    Unanswered: =Count in SQL Report

    In the Report Footer I had this script in my Access 2010. I am now converting the entire database to SQL with Access as the front-end. In the Control Source in the Report the conversion added the "A" Alike in it. I have no idea how to convert it to work with SQL and pull the word Consent from the Consents column.


    Any idea? Thanks!


    =Count(IIf([Consents] ALike "*Consent*",1))

  2. #2
    Join Date
    Sep 2001
    Location
    Chicago, Illinois, USA
    Posts
    601
    Have you tried something as simple as attempting to remove the "A" from the word "ALike" ???

    Are you SURE that this was just not a typo on your part?
    Ken

    Maverick Software Design

    (847) 864-3600 x2

  3. #3
    Join Date
    Nov 2010
    Posts
    29
    Yes I removed it and it keeps coming back. SQL puts it back in everytime.

  4. #4
    Join Date
    Sep 2001
    Location
    Chicago, Illinois, USA
    Posts
    601
    The ControSource of an Access report is either a table name, a query name or a query definition. All three of these things are Access objects, having little to do with SQL. Why are you saying that SQL is doing this?

    Is the ControlSource a pass-through query--which shouldn't make a difference anyway as it is simply text.

    You are going to have to explain what is happening a bit more.


    Actually, a report object does not have a "ControlSource," it has a RecordSource. Let's clarify here.
    Ken

    Maverick Software Design

    (847) 864-3600 x2

  5. #5
    Join Date
    Nov 2010
    Posts
    29
    The control source is now pulling information from the SQL Store Procedure not the Access query. SQL is the back-end for Access. I verified the Report does have a Control Source.

    I even tried this: =[Count]([Consents])=[Consent]

    Still doesn't work.

Posting Permissions

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