Results 1 to 4 of 4

Thread: functions

  1. #1
    Join Date
    Jun 2002

    Unanswered: functions


    i have a simple questions -- do the functions like FORMAT and IIF that can be used in a SELECT clause to modify the results, change the recordset in some significant way?

    i am asking this because a dumb grid activex control that i am obliged to use does not display data for columns modified by such functions
    e.g. displaying the date in a date column, and not displaying it if i do FORMAT(Date, 'MM/DD/YYYY') AS Date
    or not displaying an added column looking like this: IIF(blah > 0, 'P', 'N') AS Type

    i've looked into the recordset that i get, the data is there. if i do the same query INTO a temp table and then do a SELECT * FROM temptable, the grid displays all the data correctly. i just dont have a clue what's going on, i am not an access expert (that's why i ask here hehe)

    thanks for your time.

  2. #2
    Join Date
    Oct 2001
    Bay Area, CA
    If you use a select query, the data does not change, it is only displayed a certain way by using functions in the SQL.

    If you use update, make table or append queries, the formatted data will be saved. So if you are writing to your temp table, the temp table now contains the formatted stuff.

    Hope this helps...

  3. #3
    Join Date
    Jun 2002
    i think i found out what the problem is but i cant fix it

    i saw that the Size property (ActualSize if i use ado) of the field obtained as a result of FORMAT(date, 'MM/DD/YYYY') is 0

    i believe that the dumb control checks that and that is why it does not display the data. now is there a way to set the size property to a non zero value?

    thank you

  4. #4
    Join Date
    Nov 2001
    An ActiveX grid you use might have it's own formatting capabilities.
    Try them.


Posting Permissions

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