Search results

  1. P

    Multi Select Listbox Access 2003 Code gives syntax error in Ms Access 2010

    yes it is another pasting error CJ London! I've never had this problem before today! Thanks Galaxiom! OK, I don't get any error when I run the query directly, only through the code on the cmd button. The SQL for qryContractListSummarybyDateContract2TYPEBREAK is: SELECT...
  2. P

    Multi Select Listbox Access 2003 Code gives syntax error in Ms Access 2010

    I can see what you are referring to in my original post. I don't know why it posted with the space because I definitely do NOT write code that way, I've been doing this way too long! The error is still happening, my sql for qryContractListSummarybyDateContract3TYPEBREAK is: SELECT...
  3. P

    Multi Select Listbox Access 2003 Code gives syntax error in Ms Access 2010

    OK, I've run this code in Access 2003 for the past 10 years without ever having a problem. I've tried your code, and it gives me the following syntax error: Syntax Error in query expression 'SELECT * FROM qryContractListSummarybyDateContract3TYPEBREAK WHERE...
  4. P

    Multi Select Listbox Access 2003 Code gives syntax error in Ms Access 2010

    Hi MLUCKHAM, Thanks for that but that was one of the first things I tried & it still gives me the same syntax error.
  5. P

    Multi Select Listbox Access 2003 Code gives syntax error in Ms Access 2010

    Hi All, I've been using the following code successfully in Access 2003 & now I need to migrate to Access 2010. The purpose of the code is to use the items that the user selects in the list box to build the criteria of a query. Access 2010 keeps giving me a syntax error when I try to run the...
  6. P

    Conditional Format & Print Code doesn't fire report

    No, the report just doesn't fire in any view. I don't get it!
  7. P

    Conditional Format & Print Code doesn't fire report

    Hi All, I have written the following code in my PageFooterSection_Format & PageFooterSection_Print events, it all looks ok to me but my report doesn't fire when i try to open it, nothing happens!! Can someone spot if i'm missing something? Private Sub PageFooterSection_Format(Cancel As...
  8. P

    Summing ListBox Column when there is a null value

    Thank so much missinglinq and ChrisO!! Capturing the first row by changing 1 to 0 makes perfect sense. Thank you!!
  9. P

    Summing ListBox Column when there is a null value

    Yes it is null. The db frontend is quite large so i can't post it. (How do i paste a screenshot here, i've never done it before?)
  10. P

    Summing ListBox Column when there is a null value

    Hi pbaldy, yes i did try that after i posted but it still returns the 'Type Mismatch' error. This is what i did: Function TonSum() As Variant Dim I As Integer, J As Integer, ctl As Control Set ctl = Me.lstDrivera2 J = ctl.ListCount - 1 TonSum = 0 For I = 1 To J TonSum = TonSum +...
  11. P

    Summing ListBox Column when there is a null value

    Hi All, This is the function i'm using for summing a listbox column: Function TonSum() As Variant Dim I As Integer, J As Integer, ctl As Control Set ctl = Me.lstDrivera2 J = ctl.ListCount - 1 TonSum = 0 For I = 1 To J TonSum = TonSum + ctl.Column(8, I) Next I End Function The...
  12. P

    Dlookup with Multiple Criteria question

    Hi Pat Hartman, Why are saying that DLookup("[ConfirmedLoad]=0" can't be right? It works fine.
  13. P

    Dlookup with Multiple Criteria question

    Apologies for my brain explosion, i've worked out a better method, this works if anyone else needs it! DLookup("[ConfirmedLoad]=0", "qryDriver4a2", "[StateID]=" & Forms!frmLoadAllocation!txtState & " And DeliveryDate=#" & Format(Forms!frmLoadAllocation!cboAllocationDate.Value, "mm/dd/yyyy") &...
  14. P

    Dlookup with Multiple Criteria question

    Hi, I'm having a tough time getting the following Dlookup to work: DLookup("[ConfirmedLoad]=0", "qryDriver4a2", "DeliveryDate=#" & Format(Forms!frmLoadAllocation!cboAllocationDate.Value, "mm/dd/yyyy") & "#" & "AND [StateID]='1'") My original Dlookup (which worked fine!) didn't require StateID...
  15. P

    Display Listbox Records based on login

    Hi All, Does anyone know if this can be done? I have a listbox that displays monthly sales records for each of our sales reps, for example something like this: SalesRep Month to Date DW $100000 SW...
  16. P

    Mutliple Criteria in Query IIF statement

    Hi Bob, I tried that, that didn't work unfortunately. Do you have any other suggestions?
  17. P

    Mutliple Criteria in Query IIF statement

    Hi Everyone, I am having trouble trying to create a multiple criteria IIF statement in my query below. I am getting a complex criteria error when i try to run the query due to the criteria that i have highlighted in red below. Can anyone steer me in the right direction on how to correct this...
  18. P

    Code not firing because of Date Format

    Awesome, thanks again!
  19. P

    Code not firing because of Date Format

    Air code is just as effective as air guitar sometimes!!!!:) Thanks Big John, that worked a treat!!!
  20. P

    Code not firing because of Date Format

    OOps, i meant to say "My If statement is NOT firing correctly" in my opening line!
Back
Top Bottom