Search results

  1. T

    Data type mismatch in criteria expression

    Private Sub cmdDetail_Click() On Error GoTo Err_cmdDetail_Click Dim stDocName As String stDocName = "rptAgingReport" DoCmd.OpenReport stDocName, acPreview, , GenerateWhere() Exit_cmdDetail_Click: Exit Sub Err_cmdDetail_Click: MsgBox Err.Description Resume...
  2. T

    =GenerateWhere() Help

    Form has a list of 5 order types (1 is blank/null) for the user to choose from. I would like to allow the query/report show ALL if nothing is selected (blank/null). Current code: Private Sub cmdDetail_Click() On Error GoTo Err_cmdDetail_Click Dim stDocName As String stDocName =...
  3. T

    Data type mismatch in criteria expression

    Yes....but only when I do not select anything (blank...assumed to be ALL) or select OTHER as the ordertype. The form that calls this query uses this in a Value List Row Source (OrderType): "New Hire";"Refresh";"Server";"Network";"Other" OrderType...
  4. T

    Data type mismatch in criteria expression

    Public Function OffDays(dtDate As Date) As Boolean If dtDate = #1/1/2002# Then OffDays = True ElseIf dtDate = #7/4/2002# Then OffDays = True ElseIf dtDate = #9/2/2002# Then OffDays = True ElseIf dtDate = #11/28/2002# Then OffDays = True ElseIf...
  5. T

    Data type mismatch in criteria expression

    Removing the MAX( and the last ) did not allow the Other or blank (ALL is what it should be) to work, still getting error. I have looked everywhere and I can not find code for Offdays(). Any ideas where I should look?
  6. T

    Data type mismatch in criteria expression

    To tell you the truth, I have inherited this database. I am assuming it was setup to look at the MAX Age of the SalesOrders. There will be multiple SalesOrders per order. It is grouped by SalesOrder. The AGE is the difference from the time I got the order and the date completed. The form...
  7. T

    Data type mismatch in criteria expression

    I am getting "Data type mismatch in criteria expression" error with the following query and module: Query Expression: Age: Max(IIf(fDetermineAging(tblIST!SODate)>30,"Over 30",IIf(fDetermineAging(tblIST!SODate)>20,"21-30",IIf(fDetermineAging(tblIST!SODate)>10,"11-20","0-10")))) Module...
  8. T

    Query using IIF

    It appears to be working now....thank you.
  9. T

    Query using IIF

    The more I think about it, I am not sure what my logic is. SD is the original Date. If not met, then RD is entered. RD should always be greater than SD. My excel conversion gave me an #Error as did SCHED DATE: IIF([SD]>Date(),[SD],IIF([RD]>Date(),[RD],"")). I am not sure of the nested IIF.
  10. T

    Query using IIF

    2 date fields. SCHEDULE DATE and RESCHEDULED DATE, for ease of typing, I am going to refer to them as SD and RD. If RD is blank and SD is in the future, then show SD. If RD is in the future, then show RD. If SD and RD is in the future, RD "SHOULD" be a greater date than SD, show RD. In...
  11. T

    Expression? Return 1 of many

    When running a query, I want to hide duplicates records for a given field. PO# will have many duplicates, depending on how many part numbers were order on the same PO#. Other unique fields are not displayed. Can an expression help with this? If not, how do I go about hiding them in a query...
  12. T

    Quiz DB

    This database looks like what I am needing to do. I need to have: 1) tblMain that has Name, QuizDate, and Score 2) A way to be able to log in if name exists in tblMain 3) Record score and date in tblMain after Quiz is complete Thanks in advance for any help you can provide!
  13. T

    Macro to EXPORT to Excel

    I would like to create a command button to export a query or report to excel. Is this possible and if so, how? Thanks in advance for any assistance.
  14. T

    Linked XLS worksheet

    Thank you for your reply ghudson. Because it is a linked table (to the spreadsheet), I can not change the table properties to text. When I view it, it does show to be text already. The column in the spreadsheet is formatted to text also but I get the same results.
  15. T

    Linked XLS worksheet

    Column A in Spreadsheet is AlphaNumeric and Numeric. When I link to the worksheet, it displays the Alphanumeric entries but shows #Num! for the numeric entries. I have tried changing the format of the cells from number, general and text but get the same results. How can I show both...
Back
Top Bottom