Search results

  1. P

    Code not firing because of Date Format

    Hi! My If statement is firing correctly because (i'm suspecting) of the date format portion of my code. To me it all looks ok, it just doesn't fire. Can anyone spot a problem with it? If Me.Qty < 3 And Me.PricePeriod = 2 And (Me.DeliveryDate < #1/5/2011# & Format(Me.DeliveryDate.Value...
  2. P

    Stuck with syntax for Module!

    Excellent Bob! Thank you for getting me out of a pickle once again!!
  3. P

    Stuck with syntax for Module!

    Hi, I've written a short module to update a field in my table: Function TestUpdateQuery() Dim strSQL As String strSQL = "" DoCmd.SetWarnings False strSQL = "UPDATE tblLocal set [LoadBoxNo] =2" & " WHERE [LoadBoxNo] =100 And [TruckNo] = " & Forms!frmDriverEdit2.Form!txtTruckNo...
  4. P

    How do i use this code in a loop/update method?

    Hopefully! Thanks again!
  5. P

    How do i use this code in a loop/update method?

    My apologies Bob, it was a long and disastrous day yesterday. Your advice definitely did not go unheeded. Thank you for your help.
  6. P

    How do i use this code in a loop/update method?

    My loop only works for the current record, but not for my whole recordset. Is my loop not working because of this? Set rst = CurrentDb.OpenRecordset("SELECT tblLocal.LoadLineID, tblLocal.JDRate, " _ & "tblLocal.SubyRate, tblLocal.JDPayment, tblLocal.Qty, tblLocal.PricePeriod FROM tblLocal " _...
  7. P

    How do i use this code in a loop/update method?

    Bob! You are legendary!!! Thank you so much, that works!
  8. P

    How do i use this code in a loop/update method?

    I just tried listing all the fields in my table tblLocal in the SELECT statement & now am getting a different error. I'm getting a syntax error (missing operator) in query expression '[Code]= MOORNSyd'... (where MOORNSyd is the text in the Code field) Does this error make sense?
  9. P

    How do i use this code in a loop/update method?

    Yes, i'm referring to the subform control.
  10. P

    How do i use this code in a loop/update method?

    LoadLineID is numeric
  11. P

    How do i use this code in a loop/update method?

    I tried that Bob, but i'm still getting the same error. Would i be getting the error because i haven't listed all the fields from tblLocal in my SELECT statment?
  12. P

    How do i use this code in a loop/update method?

    I've tried having a go at creating a loop. For the time being i've eliminated the IF statement & i'm trying to get the loop to Dlookup the value of the JDRate in the query. I keep getting a Run-time error '3061' "Too few parameters. Expected 1" error. Here is my attempt: Dim rst As...
  13. P

    How do i use this code in a loop/update method?

    Hi All, I have a form "frmCandM" where i would like to click a command button & update all of the rates in the opened recordset in subform "subfrmAdbriMasonry". I need to abide by the following criteria: If Me.Qty < 3 And Me.PricePeriod = 1 Then Forms!frmCandM!subfrmAdbriMasonry!JDRate =...
  14. P

    Does anyone know a way to make this Dlookup perform faster?

    Cool, thanks Paul. I'll test this & post the outcome here.
  15. P

    How do i show this in a Pass Through Query

    Yes Paul! I used the CONVERT function & it works! Thank you for triggering my brain!!
  16. P

    Does anyone know a way to make this Dlookup perform faster?

    Hi Paul, Yes i need to speed up the query. Opening the form "frmDriverEdit" takes about 10 seconds, which is way too slow. This is full sub: Sub CheckDriver1() If DLookup("[ConfirmedLoad]=0", "qryDrivera") Or Not Forms!frmDriverEdit!lstDrivera.ListCount > 0 Then...
  17. P

    How do i show this in a Pass Through Query

    Hi all, Does anyone know how i would show this in a Pass Through Query?: Sum(tblLocal.MinQty) AS SumOfMinQty, I get the following error: ODBC--call failed. [Microsoft][ODBC SQL Server Driver][SQL Server] The sum or average aggregate operation cannot take nvarchar data type as an argument...
  18. P

    Does anyone know a way to make this Dlookup perform faster?

    Hi all, This is a sub that i call upon opening form "frmDriverEdit" from a command button that is placed on another form "frmAtaGlance": Sub CheckDriver1() If DLookup("[ConfirmedLoad]=0", "qryDrivera") Or Not Forms!frmDriverEdit!lstDrivera.ListCount > 0 Then...
  19. P

    How come i get this error when using Dlookup?

    Don't worry!!! I think i've been spending way too many hours programming!!! I've solved my own problem! DUHHH!!!!
  20. P

    How come i get this error when using Dlookup?

    Hi all, I'm trying to do the following: Forms!frmAtaGlance!txtDriver1 = DLookup("DriverName1", "qryAllocationDriverList2", "Id=Me.txtid") and i'm receiving an error that states that there are "too few parameters -1". I'm suspecting the error is coming from "Id=Me.txtid". Can anyone tell me...
Back
Top Bottom