Search results

  1. S

    Trying to change Select into Delete Query

    I'm trying to change a select query to a delete query and can't seem to get it to work. I append records to my table [Keys] daily and one of the fields is the date the record was appended [Updated]. If there are records of a given [Cycle] with different [Updated] dates I want to delete all...
  2. S

    Comparing Different Length Text Fields

    How do you compare text fields that are different length? I have two fields, [Comment] (21 characters) and [ChgComment] (# of characters in field 0-21). The two fields usually contain the same characters, only the length is different. Under the Criteria for [Comment] I entered <>[ChgComment]...
  3. S

    Need to make qry faster

    I'm working with an Oracle DB using Access for Reports. I've found that the order of the Tables and Field criteria makes a huge difference. It's a little hard to explain and will take a little tinkering, but I have one table in the DB that has 2.8 million records and I initially wrote a query...
  4. S

    IIf with Odd + Even Numbers

    I am trying to select records based on weather or not a field is odd or even. If the [Month] is odd the [CYCLE] s/b <=21 If the [Month] is even the [CYCLE] s/b >=22 IIf([Month] Mod 2=0,>"21",<"22") This doesn't return any records. IIf([Month] Mod 2=0,>21,<22) This gives me any error...
  5. S

    Date Range from Entry of Month + Year

    I agree with you about the date, but I didn't create the database. It's been created per the specifications of an application we are using and the application isn't customizable.
  6. S

    Date Range from Entry of Month + Year

    The date field is an 8 digit numeric field YYYYMMDD.
  7. S

    Date Range from Entry of Month + Year

    I took the quotation marks out right after the IIf statements and it seems to be working. I won't know for sure until I can test it at work Monday. >=IIf([Month]=1,([Year]-1) & "1225",IIf([Month]<11,[Year] & "0" & ([Month]-1) & "25",[Year] & ([Month]-1) & "25")) And <=IIf([Month]=12,([Year]+1)...
  8. S

    Date Range from Entry of Month + Year

    I'm trying to select records based on a date range which is automatically computed based on entry of only the month and year. The format is YYYYMMDD. I want to add a few days before the beginning of the month and a few after so I chose the 25th and the 5th as the days. If the month =1 and...
  9. S

    Search for " or - in a field

    Thanks for the help Jon.
  10. S

    Changing text color based on values

    I don't know about changing colors in a query, but you can do it in a report. Click on Format, and then Conditional Formatting.
  11. S

    Search for " or - in a field

    I have a field that has either a quotation mark or a hyphen as part of the field. It would look like this. 9-153807 or 3" 503279 My question is how do I search for either a quotation mark or a hyphen in a field...
  12. S

    Ucase() function question

    F14: IIf([F4] Is Not Null,UCase([F4]),"MISCELLANEOUS")
  13. S

    Query Problem W/Null Value

    This query works fine when there is a value in the [Route] field. It doesn't if it is null . I can fix this but it would require another embedded IIf statement that is a duplicate of the 2nd one. Is there an easier way? The first portion should apply only if the 1st character of the [Route]...
  14. S

    IIf Statement

    I'm not sure if this is the easiest, but it works. You can create new columns. expr2: iif([DATEFIELD1] is null,1,0) expr3: iif([DATEFIELD2] is null,1,0) These columns will have a 1 in them if the [DATEFIELD] is null, or a 0 if not. You can then count the 1s and that will give you a count of...
  15. S

    IIf Statement

    You can create a new column. expr1: iif([DATEFIELD1] is null,[DATEFIELD2],[DATEFIELD1]) - Kevin
  16. S

    Page Break on 1st Character of Field

    Thanks Sean, that worked. The only thing I forgot was the Force New Page property. - Kevin
  17. S

    Page Break on 1st Character of Field

    I create an expr1 field in the query using LEFT$([FIELDNAME],1) which has only the 1st character of the original field. I then create an expr1 header in the report with the properties groupe header Yes, and keep together Whole Group. I got this to work on one report, but can't seem to get it...
  18. S

    Page Break on 1st Character of Field

    I have a field in a report that represents a geographic area. The first character represents a large area and each succesive character narrows the area represented. How can I force a page-break based on a change in only the first character of the field. Here's an example 601-0530 602-0760...
  19. S

    Automatic Printer Selection?

    Is there a way to have a report automatically print to the correct printer based on a value in the report or a value in the query that generates the report. We print reports through our network in different district offices. We have a district field in our database which identifies the...
  20. S

    Return records based on user input

    WHERE iif([Enter value] is null, [FieldName] is null, [FieldName]=[Enter value]) The above works to return records with a value entered for a field, or all records with a null value in that field if there is no user input...
Back
Top Bottom