Search results

  1. S

    Expression to include holidays > Array question

    I'm going to give this thread a kick in the ass... I've had some PM with Arnelgp about this a while ago which solved almost every issue I had with this question. Arnelgp came with the code at the bottom of this thread which works like a charm. However, I've come up to one instance where it...
  2. S

    Prevent (semi-) duplicate entry to table by form

    The shipment number field is indeed text. Based on your suggestion I ended up with below code which at least doesn't generate the "Expected: list seperator or)" error, and I get the message which I was expecting. If DCount("Shipment Number", "TBL_Master_Reason_Code_Per_Shipment", "[Shipment...
  3. S

    Prevent (semi-) duplicate entry to table by form

    Based on above, I still get the same error message. Based on the code of Minty I keep getting an "Expected: list seperator or)" error. I count 9 x " in the code, so it looks to me that a part is not closed, however I can't seem to find where...:banghead: If I retype the code, the yellow bar...
  4. S

    Prevent (semi-) duplicate entry to table by form

    Ok, I have created something that works when I run it in a select query, however transferring it to the BeforeUpdate event results in the following run-time error: The test code I've build is: If DCount("Shipment Number", "TBL_Master_Reason_Code_Per_Shipment"...
  5. S

    Prevent (semi-) duplicate entry to table by form

    Hello all, I'm not sure if this should be posted in the VBA section, but I'll start off here. I've got the following parts in my DB: - Master table with all possible reason codes - Table with shipment number / reason code / comment - Form to enter new data in to the second table However...
  6. S

    Help... On change textbox, populate listbox with values from table?

    It turned out I was over-engineering something that could be build easily with the table in a subform... More or less solved it :)
  7. S

    Help... On change textbox, populate listbox with values from table?

    Thank you for the quick reply, however, I still do not get result. My listbox remains empty. There is data for the value I enter in the TBL_Master_Reason_Code_Per_Shipment, of that I'm sure. -- Edit -- What should I put in the Record Source field for my form? If I put...
  8. S

    Help... On change textbox, populate listbox with values from table?

    Hello all, I've got a form with an unbound textbox where I can enter a 7 digit shipment ID, for example 1175080 On the same form, I've got a listbox, which I want to display the values from a table, but filtered on "Like textbox" What I have created is an on change event for my textbox...
  9. S

    Split table to different export files based on table field value

    Solved this one myself with Google help :eek: First I call the sub that creates the overall temporary table. From that table, I create a secondary table that simply contains the Forwarder Agents that are in the temporary table. Public Sub GrossPerformanceForwarder_Click() Call...
  10. S

    Split table to different export files based on table field value

    Good morning all, First, lets start with my goal: I've got a VBA which creates a temporary table with some data fields, including one field called Forwarding Agent. This table is created based on forwarding agents selected in a multi-select box on a form. The field can contain one forwarding...
  11. S

    Inconsequent results after two simple queries

    I'll certainly look in to this, as you say, I'm familiar with this code of course. I never heard of the aliasing. Worth looking in to. This returns only one line, with the correct entry in the fields.
  12. S

    Inconsequent results after two simple queries

    OK, I'm probably making the most rookie mistake, but I can't get a grip on where it goes wrong. I've got the following query, which basically shows the shipments where I've got a reason code being LD**** or Null. SELECT QRY_Gross_Performance_4.[Shipment Number]...
  13. S

    VBA String IIf - Query result returns blank

    And it is solved:D:banghead: With your latest statement I started this morning by simply building the IIf statement in an additional query, and having the strSQL pull the data from that query and thus only having to filter on date and selected carriers. Final strSQL is now strSQL = "SELECT...
  14. S

    VBA String IIf - Query result returns blank

    Ever since your comment, I think that I'm over-engineering this part from the beginning though. Anyhow, Monday will be the next moment I'll be working on it... Weekend it is :P
  15. S

    VBA String IIf - Query result returns blank

    Ok, I didn't know that. I'm going to work on it and if I have any questions on that part, I'll come back here. Thank you for your time for now!
  16. S

    VBA String IIf - Query result returns blank

    Ok, I've changed the string to strPODGross = "'" & DLookup("[POD Gross]", "[QRY_Gross_Performance_3]") & "'" Which now populates the POD Gross as 'POD Late by Date' for all 14 example lines, although the way I read it, I should get the POD Gross from QRY_Gross_Performance_3, which is either...
  17. S

    VBA String IIf - Query result returns blank

    Ok, based on your help I got below: Private Sub Gross_Performance_Carrier_Click() 'make sure a from date has been entered If IsNull(From_Date) Then MsgBox "'From' date cannot be blank.", vbInformation, "Date required" Exit Sub End If...
  18. S

    VBA String IIf - Query result returns blank

    The entire SQL is as below: Dim strSQL As String strSQL = "SELECT QRY_Gross_Performance_3.[Shipment Number], QRY_Gross_Performance_3.[Mode], QRY_Gross_Performance_3.[Forwarding agent], QRY_Gross_Performance_3.[Shipping Pnt], QRY_Gross_Performance_3.[Startloc City]...
  19. S

    VBA String IIf - Query result returns blank

    When I change the last part to WHERE (((QRY_Gross_Performance_3.[Departure Date]) Between #10/01/2015# And #10/31/2015#) AND (" & strWhere & "));" I still get the same error message
  20. S

    VBA String IIf - Query result returns blank

    I thought it was going to be an easy fix, as I thought it was in the link to the QRY_Gross_Performance_3. However, with the answer from Arnelgp, I've came up with below, which seems to fill the IIf statements, however, I now get the error Below is the VBA code: Private Sub...
Back
Top Bottom