Question : CInt not working

I can't seem to get this to evaluate the number in the combo box as a number.  The immediate window shows the number in the combo box as '8' and is only bringing up records that are 9 days old.  The other records 10 Days and older are not showing up.

s = s & " And [B2B EDGE].phase = 0" & _
    " And DateDiff('d', app_date, Now) < 500" & _
    " And DateDiff('d', app_date, Now) > '" & CInt(Forms!frmPhaseData2.cboDays) & "'" & _
    " And [B2B EDGE].Manager like '" & Nz(Me.cboManager, "*") & "'"

Answer : CInt not working

enclosing stuff in single quotes make access evaluate as text. Make sense?

Replace your code with this

s = s & " And [B2B EDGE].phase = 0" & _
    " And DateDiff('d', app_date, Now) < 500" & _
    " And DateDiff('d', app_date, Now) > " & CInt(Forms!frmPhaseData2.cboDays) &  _
    " And [B2B EDGE].Manager like '" & Nz(Me.cboManager, "*") & "'"

Chris
Random Solutions  
  •  How to delete a replica from the synchronization list?
  •  SBS 2008 Remote Web Workspace getting 10009 and continously prompting users for password, not letting them into there PCs
  •  binding items collection of several comboBoxes to the Values in a specified column of the table
  •  Table Long datatype and ADO adInteger parameter datatype
  •  Windows XP Professional - administrator account is missing, can't get it back, files are directory structure still there
  •  set access rights for public folders on exchange 2007
  •  Arrays into Crystal Reports
  •  Change exchange account email display name
  •  I am copying 40 diferent databases to a directory that these databases already exists. How do I prevent the system message "This Directory already exist" "Overwright" "Yes" "No" from appearing each ti
  •  Need help getting started with n-tier design in asp.net 3.5
  •  
    programming4us programming4us