Results 1 to 2 of 2
  1. #1
    jamin14 is offline Novice
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Posts
    17

    Functions

    i'm trying to do a date serial function as below



    Public Function lastofLastMonth() As Date
    DateSerial(2010, 2, 28)
    End Function

    i get a syntax error can someone tell me what i am missing please


    thanks

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2007
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Try:
    Public Function lastofLastMonth() As Date
    lastofLastMonth = DateSerial(2010, 2, 28)
    End Function

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

Similar Threads

  1. Help with functions / procedures
    By curnil in forum Programming
    Replies: 3
    Last Post: 03-09-2010, 05:41 PM
  2. Sorting and creating functions
    By BUS 101 in forum Access
    Replies: 1
    Last Post: 09-15-2009, 02:13 PM
  3. Concatenation, nested IIF functions
    By krymer in forum Queries
    Replies: 2
    Last Post: 10-20-2008, 07:27 AM
  4. Multiple IIF functions possible?
    By Northgate in forum Access
    Replies: 0
    Last Post: 10-08-2008, 01:11 PM
  5. Functions in Query Criteria
    By hraup in forum Queries
    Replies: 1
    Last Post: 10-06-2006, 06:41 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