Search results

  1. S

    Strange month behavior when formatting "mm"

    Good morning all, I'm experiencing strange behavior of my month part of a date field. When I format it either format(month(date()),"mm") or format(datepart("m",date()),"mm") it both returns a month one before the actual month. January > 12 February > 01 If I don't format, it returns the...
  2. S

    VBA funcion(fnSpecialDate) causes inability to sort / filter on result

    Hello all, I'm working with a function created by Arnelgp to add specific holidays on freight forwarder country to a source date. Public Function fnGetHolidays(varCountryCode As Variant, dDate As Variant) As Variant Dim strSql As String Dim rs As DAO.Recordset Dim strCountryCode...
  3. S

    Wildcard in pathname?

    Hello all, I'm trying to make a script that deletes a folder when I click a button. I'm using below code where the * translates to a weeknumber. At least, it should. If I change the * to the weeknumber (e.g. "Week 27") the folder is deleted. I think I'm using the wrong build-up with the...
  4. S

    Run-time error 3129 - Invalid SQL statement

    Good morning :) I've got a small and probably easy-to-solve Monday-morning problem, giving me an headache and a run-time error 3129 (Invalid SQL statement; expected 'DELETE', 'INSERT', 'PROCEDURE', 'SELECT', or 'UPDATE'.) Dim strSQLCollection As String...
  5. S

    'Strange' results from expression

    Hello all, I've got below expression in a query... Gross Document Performance: IIf([QRY_Gross_Performance_Document_2]![Document Upload Date] Is Null And [QRY_Gross_Performance_Document_2]![Target Date]>=Date();"Pending";IIf([QRY_Gross_Performance_Document_2]![Document Upload Date] Is Null And...
  6. S

    Export to CSV - Date format going wrong

    Hello all, I've got a small challenge that I cannot seem to get solved. I'm exporting a query (QRY_Gross_Performance_4) to a CSV file via a SELECT SQL in VBA, since I need to apply some variable filters on it. I've got a field QRY_Gross_Performance_4.[Departure Date] that is formatted in to...
  7. 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...
  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

    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...
  10. 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]...
  11. 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...
  12. 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...
  13. 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...
  14. S

    Expression to include holidays > Array question

    Hello all, I'm experiencing a lack of knowledge on my side again... I've borrowed a piece of code from http://access.mvps.org/access/datetime/date0012.htm. ' ********* Code Start ************** ' ' Modified from code in ' "Visual Basic Language Developer's Handbook" ' by Ken Getz and Mike...
  15. S

    Delete data from Table based on Select Query -

    Delete data from Table based on Select Query - Could not delete from specified table I'm trying to delete all duplicates from a master table with autonumber field as primary key. Based on other information found via the big Google machine, I've build a query that groups by on all fields in the...
  16. S

    Multi-select listbox to generate report - runtime error 3075

    Good morning all, I am trying to use an multi-select listbox to generate a report for the selected forwarding agents only. I'm copying the code from http://www.baldyweb.com/multiselect.htm, changed this part of the code as the values are text in the table where the report is created from...
  17. S

    VBA - DoCmd.TransferText - Date issue

    Good morning all, Let me start with informing you that I'm completely new to VBA programming. I've got some Access experience, and want to move on in this. I'm trying to import data in to Access from a CSV file with a semicolon as a seperator. I've been able to do this with the following...
  18. S

    Cound records with specific field value?

    Hi all, here I am with a new challange :D I've got a report, called Fleetlist. On this report, a list of trucks is given, based upon a selection on a form. At the bottom of the report, there is a textbox which shows how much trucks are on the fleetlist. This all works fine. The trucks have...
  19. S

    Sub-report appearing multiple times on report

    Ok. The last problem to overcome before I can go live with my database within the company :D I've got a report called Invoice. On this report, I've got a sub-report, called InvoiceRules. A user selects a invoice-number on a form, and presses a print-button. The sub-report is printed on the...
  20. S

    Have combobox populate textbox and table

    Ok, here I am with a new problem :D I've got a combobox with which the user can select a product. This combobox is based upon the table Products.On selection of a product, a textbox is populated with the price of the product, made possible with the control source =[Product].Column(1). This...
Top Bottom