Results 1 to 3 of 3
  1. #1
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Format and Val Function Question (Access 2002 >)

    Hi,
    Can I confirm my "untested" approach with the access guru's!

    I was asked by a customer for a quick solution to these two problems:
    1. How do you query a date/time field to filter a date without having to add the asterix after the filter. IE... >01/07/2005* where the * represents any time value.
    My Answer: Set a calculated field... OnlyDate:=Format([myDate],"dd/mm/yyyy") and filter on this, so as not to have to incl. the * in the filter!

    2. After importing Oracle data into Access, the values are seen as text. How do I convert this into values to calculate with?
    My Answer: In a query set up expression... NewValue:=Val([ImportVal])

    Are there ather approaches to these questions, or is a calculated query filed the only / best approach?

    Tx
    Regards,
    Rudi

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Format and Val Function Question (Access 2002 >)

    1) You can extract the date value using OnlyDate: Int([myDate])
    (Don't use := )
    2) Depending on the type of number you need, you can also use CDbl, CSng, CLng etc. instead of Val.

  3. #3
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Format and Val Function Question (Access 2002 >)

    OK. Tx

    Based on your answers it seems like the best approach is using formulas. Tx for the inside info and the choices based on what is required. I'll let the person know!

    PS: If :=) won't work...maybe <img src=/S/smile.gif border=0 alt=smile width=15 height=15>, oe ;-), or 8-|), or................ <img src=/S/grin.gif border=0 alt=grin width=15 height=15>
    Regards,
    Rudi

Posting Permissions

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