Search results

  1. S

    VBA String IIf - Query result returns blank

    Ok guys, I'm probably making a rookie mistake here with VBA, but I can't get grip on where I'm making it...:banghead: I've got a DoCmd.runSQL in my VBA, which contains two IIf statements. To make the VBA readable for everyone who might need to work on it, I've pulled the IIf out from the...
  2. S

    Comparing dates with Date() returns different results

    I am using "" in earlier expressions to translate a Null, as I understuud from Mr. Google that Null is something to avoid in Access. What I am doing in earlier expressions is Iif(IsNull(Actual End Date;"";......) Can I keep it still as Iif(IsNull(Actual End Date;Null;...) as a safe work method?
  3. S

    Comparing dates with Date() returns different results

    I thought to make it more easy, I would only post the part of the expression resulting in the issue. Below is my complete expression: Test Check: IIf([QRY_Gross_Performance_2]![POD Target Date]="";"";IIf([QRY_Gross_Performance_2]![POD Target Date]<Date() And...
  4. S

    Comparing dates with Date() returns different results

    Just changed it to your suggestion, it still provides the same results, 8th January 2015 "POD Pending", 15th January 2015 "POD Pending - Late"...
  5. S

    Comparing dates with Date() returns different results

    Just checked, it sees the day, month and year correctly as January for both (/ all) entries. Even if Access would have swapped day / month, resulting in August 1st, 2015 instead of January 8th, 2015, the date would still be before today, November 19th, 2015, so the expression would need to...
  6. S

    Comparing dates with Date() returns different results

    Good afternoon all, I've got a query that returns "POD Target Date". This date is based on "Actual End Date" + a number of days. The result is formatted as short date. Based on "POD Date", stored as short date format, I want to print a text. The whole thing works, except for one issue that I...
  7. S

    Expression to include holidays > Array question

    It now seems to run without giving error messages. However, if I run the formula as below (simple test expression): Test: dhAddWorkDaysA(2;Date();fnGetHolidays([TBL_Master_CP201]![Forwarding agent])) This should, based on the country of the forwarding agent of that line being Belgium and...
  8. S

    Expression to include holidays > Array question

    Unfortunately still the same error message, now highlighting arrHolidays(UBound(arrHolidays)) = ![Date]
  9. S

    Expression to include holidays > Array question

    Ok, it now continues to a new error. And when I click debug it highlights arrHolidays(i) = !Date Can it be that I have to much data to be placed in the array?
  10. S

    Expression to include holidays > Array question

    Did that, when I press enter it prints: Select [TBL_Source_Holidays].[Date] From [TBL_Source_Freight_Forwarder] Inner Join [TBL_Source_Holidays] On [TBL_Source_Freight_Forwarder].[Country Code] = [TBL_Source_Holidays].[Country Code] Where [TBL_Source_Freight_Forwarder].[Forwarder Code] = DHLAIR;
  11. S

    Trying to suppress MsgBox from other subroutine - creates error

    Ah, ok. Learning every day here! It works like a charm now, thank you very much for your support!
  12. S

    Trying to suppress MsgBox from other subroutine - creates error

    I've added the breakpoint at the line you mentioned, but it immediately gives the mentioned error, without even reaching the breakpoint. I've added the breakpoint to the Call Import_CP201_Click(False) and the Public Sub Import_All_Click(), but in both instances, it gives the error immediately...
  13. S

    Trying to suppress MsgBox from other subroutine - creates error

    Still provides the same error message unfortunately
  14. S

    Trying to suppress MsgBox from other subroutine - creates error

    When I do this, I don't get the compile error anymore, but when I try to run it (both seperately and in the "import all"), I get below error. The import sub looks as below: Public Sub Import_CP201_Click(Optional ShowMessages = True) DoCmd.SetWarnings False 'Identify newest CP201...
  15. S

    Trying to suppress MsgBox from other subroutine - creates error

    Hello all, I've got five subroutines which can be run separately, and include a message box when an import is completed. I also have one button which calls the five subroutines, to import all data at once. However, when I run this, I get the message box from each subroutine, which holds the...
  16. S

    Delete data from Table based on Select Query -

    I didn't get it to work like you suggested, but it turned out it was faster to have the query create a new table and delete the old table via VBA.
  17. S

    Expression to include holidays > Array question

    When debugging it highlights: Set rs = db.OpenRecordset(strSQL, dbOpenSnapshot)
  18. S

    Expression to include holidays > Array question

    Thank you arnelgp. I've put the statement in a module, however, when I run it, I get the error Run-time error '3061' To few parameters. Expected 1. I've been renaming my tables as below, but changed all the names as you have them in your statement as well. [Supplier Master] >...
  19. S

    Expression to include holidays > Array question

    My apologies for the late reply, I just found out the message board alerts where sent to an old email address...:o In plain English, what I'm trying to do is the following: - I have a table with suppliers, including a supplier code and a country code. - I have a table with dates (dd-mm-yyyy...
  20. S

    Expression to include holidays > Array question

    The TBL_Source_Document_Upload_Margin doesn't contain either of them. TBL_Master_CP201 has (among other non-relevant fields) a document type, supplier code, start and end date TBL_Source_Document_Upload_Margin has a document type, margin (number of days between start or end) and indicator if...
Back
Top Bottom