SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Member
    Join Date
    Jul 2004
    Location
    canada
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    ms access question?

    I have set the data type to "number" but when i ran the querries it reverts back to "Text".
    What other properties I need to change?

    Thanks in advance!

  2. #2
    SitePoint Wizard westmich's Avatar
    Join Date
    Mar 2000
    Location
    Muskegon, MI
    Posts
    2,328
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Can you post some code?
    Westmich
    Smart Web Solutions for Smart Clients
    http://www.mindscapecreative.com

  3. #3
    SitePoint Member
    Join Date
    Jul 2004
    Location
    canada
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    here's example

    I set up a module

    if Month = 1 then Jan = 5 else Jan = 0
    If Month = 2 then Feb = 10 else Feb = 0

    applied the module in the query
    Field: January: Jan(Month, January)
    set the table data type for January as "number" but when the query is executed the Table properties shows January with the data type 'Text'

  4. #4
    SitePoint Wizard westmich's Avatar
    Join Date
    Mar 2000
    Location
    Muskegon, MI
    Posts
    2,328
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Still a little foggy - can you post your SQL statement?
    Westmich
    Smart Web Solutions for Smart Clients
    http://www.mindscapecreative.com

  5. #5
    SitePoint Member
    Join Date
    Jul 2004
    Location
    canada
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here's the code:

    The code is working except when I view the table the field keeps changing to 'Text' even if change the 'Data Type' to 'number'.

    Function December(MONTH, Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec, component_Inv)
    If MONTH = 1 Then
    December = component_Inv - Jan - Feb - Mar - Apr - May - Jun - Jul - Aug - Sep - Oct - Nov - Dec
    Else
    December = 0
    If MONTH = 2 Then
    December = component_Inv - Feb - Mar - Apr - May - Jun - Jul - Aug - Sep - Oct - Nov - Dec
    Else
    December = 0
    If MONTH = 3 Then
    December = component_Inv - Mar - Apr - May - Jun - Jul - Aug - Sep - Oct - Nov - Dec
    Else
    December = 0
    If MONTH = 4 Then
    December = component_Inv - Apr - May - Jun - Jul - Aug - Sep - Oct - Nov - Dec
    Else
    December = 0
    If MONTH = 5 Then
    December = component_Inv - May - Jun - Jul - Aug - Sep - Oct - Nov - Dec
    Else
    December = 0
    If MONTH = 6 Then
    December = component_Inv - Jun - Jul - Aug - Sep - Oct - Nov - Dec
    Else
    December = 0
    If MONTH = 7 Then
    December = component_Inv - Jul - Aug - Sep - Oct - Nov - Dec
    Else
    December = 0
    If MONTH = 8 Then
    December = component_Inv - Aug - Sep - Oct - Nov - Dec
    Else
    December = 0
    If MONTH = 9 Then
    December = component_Inv - Sep - Oct - Nov - Dec
    Else
    December = 0
    If MONTH = 10 Then
    December = component_Inv - Oct - Nov - Dec
    Else
    December = 0
    If MONTH = 11 Then
    December = component_Inv - Nov - Dec
    Else
    December = 0
    If MONTH = 12 Then
    December = component_Inv - Dec
    Else
    December = 0
    End If
    End If
    End If
    End If
    End If
    End If
    End If
    End If
    End If
    End If
    End If
    End If
    End Function


Bookmarks

Posting Permissions

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