Results 1 to 2 of 2
  1. #1
    cplmckenzie is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2012
    Posts
    25

    Convert textbox value to number?

    Hi all,



    I have a question and could use some help.

    Does the month(function) in Access return a numeric value and how can a value from a
    textbox on a form be cnverted to numeric.

    Here is a part from My SELECT statement that does return data for the specified month
    in txtMonth textbox.

    FROM 2014ExpenseList
    WHERE [2014ExpenseList].[month(TransDate)] = txtMonth;

    What I would like to do is if....
    txtMonth contains 12, have data returned for month 11 (November).
    Is this possible and how.

    cplmckenzie

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    Yes, but the way you're using it Access is going to prompt you, because of the brackets. Try

    WHERE month(2014ExpenseList.TransDate) = txtMonth;

    Presumably you're actually using the full form reference, since you said it was working.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 3
    Last Post: 04-28-2014, 03:17 PM
  2. convert number to text number like in cheque
    By ravideep in forum Reports
    Replies: 1
    Last Post: 03-12-2013, 05:55 AM
  3. Replies: 0
    Last Post: 10-22-2012, 02:45 PM
  4. Convert VALUE in Textbox to CAPS in TABLE
    By taimysho0 in forum Programming
    Replies: 3
    Last Post: 12-30-2011, 05:04 PM
  5. Replies: 2
    Last Post: 11-22-2011, 11:45 AM

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