Recent content by Ken Sheridan

  1. Ken Sheridan

    Getting an error 3825, complaining about multi-valued fields, but none are involved.

    There is nothing to stop an INSERT INTO statement from inserting values from an autonumber column in one table into an autonumber column in another table, provided that the unique index on the column in the destination table is not violated. Autonumber is not a data type per se, the data type...
  2. Ken Sheridan

    Solved Date is displaying odd behavior

    Declaring the parameters is generally not essential, but I did discuss this with John Viescas many years ago in the context of a post we'd received in the old CompuServe Access forum, in which we were both sysops, where the poster had found that parameters in her local date format were not being...
  3. Ken Sheridan

    Solved Date is displaying odd behavior

    I would recommend that when including date parameters in a query they be declared as such, e.g. PARAMETERS Forms!frmDateRange!txtStartDate DATETIME, Forms!frmDateRange!txtEndDate DATETIME; SELECT TransactionDate, FirstName, LastName, TransactionAmount FROM Customers INNER JOIN Transactions ON...
  4. Ken Sheridan

    Solved Date is displaying odd behavior

    Firstly, to assign a value to a bound column in the form's current record you should use the bound control's Value property. As this is the default property you do not need to specify it. Secondly a date literal must be delimited with # characters and be in US or an otherwise internationally...
  5. Ken Sheridan

    Solved Data entry creates a new client

    I think I misunderstood your original post. I assumed that the parent form, by virtue of its name, was for inserting a revenue transaction, and consequently that the subform was for inserting multiple line items per transaction. As far as I can see on reflection, the parent form is merely to...
  6. Ken Sheridan

    Solved Data entry creates a new client

    Your frmCDRevenue form is bound to the tblDemoClients table, and its DataEntry property is set to True (Yes). This property is rather confusingly named as it causes the form to always open at an empty new record. Consequently a new row is inserted into the tblDemoClients table. You need a...
  7. Ken Sheridan

    Selecting only records where both of two values exist

    The term Cartesian derives from the name of the French mathematician and philosopher René Descartes. A major step in the development of mathematics was his introduction of a coordinate system for defining points on a Euclidean plane by the intersection of two straight axes. This unified...
  8. Ken Sheridan

    Selecting only records where both of two values exist

    Rather than calling the EXISTS predicate and multiple subqueries, which could be tedious if the value list were a long one, the attached little demo file illustrates how rows can be returned in the context of a binary relationship by selecting values in a multi-select list box. In the demo this...
  9. Ken Sheridan

    Calculated Field Error

    I use the following generic function for names and any other sets of values which require concatenating. It was originally adapted from a CanShrinkLines function published by Microsoft many years ago for returning an address, suppressing Null lines: Public Function ConcatValues(strSeparator...
  10. Ken Sheridan

    Solved Conditional formatting without conditional formatting

    An easy way, which predates conditional formatting, to colour code rows on the basis of a value in a column is to firstly create a table with, in your case, a Notes column its primary key and a further column with a single plain bitmap image of distinct colours. The choice of colours is...
  11. Ken Sheridan

    Access subform - Current event does not fire on first record selected

    Why not add a Selected column of Boolean data type to the table, or to a separate table in a one to one relationship. You could then either include a check box bound to the column in the subform, or, if the form's recordset is not updatable, select the rows in a separate unbound dialogue form...
  12. Ken Sheridan

    Error 3828 when exporting queries to Excel

    The following is a simple example (untested) which replaces a parameter referencing a txtDateApponted parameter with the value of the parameter: Dim strSQL_Current as String Dim strSQL_Temp As String Dim qdf As DAO.Querydef ' replace queries SQL statement , substituting a...
  13. Ken Sheridan

    Solved How to handle ' in sql string

    I'd forgotten about possessive apostrophes. I'd describe multiple sets of double quotes in much the same way as pairs: A contiguous set of n double quote characters. BTW the OED makes a firm distinction between the apostrophe character, which it calls a sign, and what it terms a quotation...
  14. Ken Sheridan

    Solved How to handle ' in sql string

    I would term that a double quote character, and a contiguous pair of double quote characters. The single quote character can only be termed an apostrophe in the context of its use to signify the omission of one or more characters in a word, not in the context of its use as a delimiter.
  15. Ken Sheridan

    Error 3828 when exporting queries to Excel

    Rather than referencing the control as a parameter, an alternative approach would be to amend the querydef object's SQL property by concatenating the value of the parameter into the string expression, before calling the TransferSpreadsheet method. Be sure that the date literal is delimited with...
Back
Top Bottom