Search results

  1. mresann

    DLookup Previous Date

    I'll be honest... I rarely use a date format that can have ambiguous interpretation, such as 1/7/2005, which can be interpretated two different ways, depending if you are in London or Long Beach. In my case I would always use #Jul 1 2005# or #Jan 7 2005#, so I perhaps am not up to speed on the...
  2. mresann

    Is this possible?

    As Pat Hartman would say, it is NEVER a good idea to contain calculated fields within a table, but use queries to calculate your data. This is a fundemental violation of table normalization rules, especially when it deals with financial transactions such as orders. Therefore, the Quantity Due...
  3. mresann

    A REALLY hard Query Question

    The method for finding the date a week earlier than a given date is quite easy. In your case, if a current week starts on Sdate, then the previous week encompasses ([Sdate]-7) to ([Sdate]-1) Keep in mind, the date field is actually a numeric field.
  4. mresann

    IIF statement is acting up in a query

    Try rewording it like this: WHERE (((Customers.ID)=IIf(IsNull([Forms]![SearchMarkets]![Market]) or [Forms]![SearchMarkets]![Market]="",([Customers].[ID]) Like "*",[Forms]![SearchMarkets]![Market]))); Using the IsNull function within the query field is usually a better alternative than checking...
  5. mresann

    Crashing Database

    You may have to rethink the code. First order of business: compact your front ends AND your back end on a regular basis, start with weekly, then work down to daily if the problems exist. If you still have problems, consider creating new databases and importing all the objects from the current...
  6. mresann

    WHY am I getting this error? (Date function)

    From this site: The string representation of a datetime value is out of range. Explanation: The string representation of a date, time or timestamp value contains a value that is out of range. This error could be caused by accessing a datetime value from an application using a country code...
  7. mresann

    DLookup Previous Date

    I don't see anything wrong with your DLookup format. When you peform operations that involve dates, to avoid ambiguity between US and International formatting standards, convert the date to include a month part that is alphabetic (for instance, "Jan 7 2005*, instead of *7/1/2005" for...
  8. mresann

    Format as Text in Append Query

    You need to change the WHERE clause to show the client number as a text field, as you indicated earlier. When you use VBA code, it's sometimes easy to forget to add the text field indicators, which are single or double quotes. As VBA uses double quotes to denote strings, it is much easier to...
  9. mresann

    IIF - help in query & labels

    Yes, I missed a bracket to the right of Spousename, sorry. Corrected: FullName: [FirstName] & " " & Iif(Not IsNull([SpouseName]), "& " & [SpouseName] & " ", "") & [LastName]
  10. mresann

    IIF - help in query & labels

    Combine the Immediate If function with the IsNull function. In the query field: FullName: [FirstName] & " " & Iif(Not IsNull([SpouseName), "& " & [SpouseName] & " ", "") & [LastName] If spouse is not present, return is "John Doe". If spouse is present, return is "John & Jane Doe".
  11. mresann

    Numbering Records In Query

    Although this is not the same tables you use, I use the three fields tblFK, StdID, and Code in a table called "Test". When you add aggregate fields to Access or other Jet based queries, you have to create a subquery using the same underlying tables or queries as aliases. SELECT Test.tblFK...
  12. mresann

    Format as Text in Append Query

    Look up CStr in Access help
  13. mresann

    Rounding and decimal problem...sort of

    Use this, it only takes a line: ((Date()-
  14. mresann

    Referencing a field on a form from a query

    Why not use the initial subform recordset to form the basis for a NEW query, and use that query as the underlying query to bring up a new form, so you can view the records without having to filter them, and then perform the update on them?
  15. mresann

    Negative calculated result to be changed to zero

    The "=" value refers to how you want the expression to be used. For form and report controls (mainly textboxes), you use the operator to set the value of the expression to the controls. For queries and SQL statements, you don't need the operator of the expression.
  16. mresann

    Negative calculated result to be changed to zero

    Iif(MyExpression<0,0,MyExpression) ...will return zero if your expression is less than zero, otherwise it will return the expression value.
  17. mresann

    Confirming selection from a listbox

    You could populate another list box with the query matching the selections of the first list box. Just loop through the Selected list box record values to build the WHERE condition for the same query and apply it to the new list box. YOu can even use the same list box, just create the new...
  18. mresann

    Listbox doesn't display all records

    Can you post the db with just the form, query, and table(s) that the query is attached to?
  19. mresann

    Uppercase in lookup combo box

    Base all your forms on queries, not tables. In the queries perform the StrConv functions to the fields you want formatted.
  20. mresann

    Access Query Freaking Out - HELP!

    Until you mentioned that your older database may be having problems, I assumed that you may have had problems related to this article: Error Text The symptoms and diagnosis was as follows: CAUSE You may experience this behavior with a table that has a self-join and Memo fields, and has...
Back
Top Bottom