Results 1 to 6 of 6
  1. #1
    Kelsod is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2013
    Posts
    12

    Compile Error while trying to create a report from a query


    I was trying to create a report from a query to try and make an invoice. I just wanted to pull all the data from the query and then I was going to design it, but I got the following error "Compile Error IIf(IsNumeric(tblsStyleName),ApploadString(tblStyl e.StyleName),tblStyles.StyleName'." How do I fix it?

  2. #2
    rzw0wr is offline I will always be a newbie
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2013
    Location
    Indiana
    Posts
    479
    IIf(IsNumeric(tblsStyleName),ApploadString(tblStyl e.StyleName),tblStyles.StyleName
    Why would you put this in a query.
    You should know if the field is numeric by the type.

    Please tell us what you want to do and maybe we can find a way that is better.

    Dale

  3. #3
    Kelsod is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2013
    Posts
    12
    I'm trying to create an invoice. I have a house table and a tenants table. the tenants are grouped by the company they work for. So I did a query for everyone that worked for a specific company. The query pulled all the info (e.g., tenant, which house they are in, the rent for that house, etc.). I wanted to create an invoice (report) based on the query that I made so that I didn't have to filter through all the other people living here. When I tried to create a report based on the query it gave me an error.

  4. #4
    rzw0wr is offline I will always be a newbie
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2013
    Location
    Indiana
    Posts
    479
    I do think that your Tenants and house(address) table should be together.
    Unless more that 1 tenant lives at the same address or a tenant live and more than 1 address.

    You may want to read up on table normalization.

    However, still why are you checking to see if a field is numeric?

    Dale

  5. #5
    Kelsod is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2013
    Posts
    12
    I'll read up on that. There are people that live together and people often move around so i just have them connected by the house they are currently in. Thanks! I'm not trying to check and see if a field is numeric. I'm just trying to create a report and that is the error I get. I have no idea what it's asking me. I didn't know how to fix it because I don't understand the error. I don't know what it's referring to.

  6. #6
    rzw0wr is offline I will always be a newbie
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2013
    Location
    Indiana
    Posts
    479
    Compile Error IIf(IsNumeric(tblsStyleName),ApploadString(tblStyl e.StyleName),tblStyles.StyleName'."
    This statement is asking if "tblsStyleName" is of an numeric type.
    I would start by removing that.
    Iif(TestForSomeThing,Truepart,FalsePart)

    If you could be a little more specific in what you want it is possible we can get something to work.

    As it stands now I have no idea what you are testing tblsStyleName for.

    Dale

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

Similar Threads

  1. Compile Error: Syntax Error in DoCmd.RunSQL Statement
    By Evilferret in forum Programming
    Replies: 1
    Last Post: 08-27-2012, 12:32 PM
  2. Replies: 2
    Last Post: 06-23-2012, 11:59 PM
  3. Replies: 7
    Last Post: 06-08-2012, 09:55 PM
  4. Replies: 6
    Last Post: 09-28-2011, 09:20 PM
  5. compile error
    By darklite in forum Access
    Replies: 6
    Last Post: 08-31-2010, 04:27 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