Search results

  1. P

    How to return null when summing values that include nulls

    This is going to take a subquery to determine if there are any nulls: SELECT Min(IsNull([MyColumn])) AS HasNulls, Sum(MyColumn) AS ColumnSum FROM YourTable; Then make a query on that and use HasNulls to determine what to return: SELECT IIF(HasNulls=False, ColumnSum) AS YourSum FROM ThatQuery
  2. P

    Open Report with multiple where conditions

    No need to remove anything. You should pastetheDBguys code. The difference is more than just one quote mark between yours and his.
  3. P

    CSV or Excel daily data

    .csv - Less opportunity for crap. Weird headers, merged cells, data on multiple tabs, formulas. Ideally they'd send you a test file, you'd review and approve it and then they send you the same format thereafter. I'd do the comparison in whatever software you are more comfortable. You're on...
  4. P

    How to remove duplicate values when multiple tables are joined

    You're table and fields are not set up properly. The method for doing that is called normalization: https://en.wikipedia.org/wiki/Database_normalization#:~:text=March%202018),part%20of%20his%20relational%20model. Give that link a read, google a few tutorials, apply what you learn to your data...
  5. P

    Delete Max record from a Table

    Why are you doing this? What are you hoping to accomplish? How are duplicates getting in? The whole premise is very suspect, this isn't normally how databases are to work. Perhaps you can give us a big picture of what this database is for and what you are ultimately trying to accomplish...
  6. P

    Solved Date field, INSERT INTO

    Ok, second guess--Timestamp is a reserved word. Using it as a name requires you escape it in code via brackets: [Timestamp] https://support.microsoft.com/en-us/office/learn-about-access-reserved-words-and-symbols-ae9d9ada-3255-4b12-91a9-f855bdd9c5a2
  7. P

    Solved Date field, INSERT INTO

    There's no space after VALUES and that opening parenthesis
  8. P

    Run query

    Can the actual 1st day of the month ever be attributed to the prior month? Or could the actual last day of a month go to the next month? Is there a situation where February 1st's data would go to the January report? Or where January 31st's data could go to February report? If not, why do you...
  9. P

    Not sure how to set relationships after splitting table

    Its not clear, mostly because you spoke with too much database jargon and not enough about the actual system you are trying to model. What's a playable sim? How does a job type have a career type? How's a job different from a career? I need context of what is represented to understand what...
  10. P

    How to run the output of Access vba SQL statement to a temp table

    Debug.Print sSQL That will print what's in sSQL to the immediate window. If you truly want to put it in a table you could make a table with one text field and then run an INSERT query to that table and put what's in sSQL into the table. DoCmd.RunSQL "INSERT INTO DebugTable (DebugField) VALUES...
  11. P

    Forms Substitution Within A Loop

    Why not respond back to the original thread you made for this: https://www.access-programmers.co.uk/forums/threads/variable-for-forms-statement.332720/ People had given advice.
  12. P

    Solved IIF with multi-criteria - Trouble

    You're logic is too complex for this to be inline, it needs to go into a function. You've got 4 cases that you need to account for, trying to cram all of it into a deeply nested iif statement is just too much for a human to achieve. So, build a function and break out the logic into as many...
  13. P

    Data Type Mismatch in custom function

    Never trust your eyes with a computer. You can't tell the difference between a NULL, an empty string and a tab character. Just because your brain can see a date, doesn't mean it's a date data type to a computer. Two ways to make sure something is an actual date is to use DateValue and...
  14. P

    Sum of values from subform to table

    Every post you've made in this thread contains at least one huge red flag that you've not set up your tables correctly. In a relational database data doesn't get moved hither and yon. It doesn't have calculations done to it in one spot and stored in another. It doesn't get stored in multiple...
  15. P

    Solved Form letter as report

    That dialog is because you told it a field name that isn't actually a field name. Whatever that dialog is asking for is the culprit. Most likely it's a typo on your part. You told it to find [ZIP] but the actual field name is [ZIPCODE] or you told it to use [CITY] but misspelled it in the...
  16. P

    Importing Specific Field Names From Excel into Access Table

    Complexity has to exist somewhere. You can manually do the complexity by a long intensive process of opening the Excel file, manipulating it such that it is ready for straight import into Access then doing the import within Access. Or you can write some complex code to do all of that for you...
  17. P

    Creating a Running Balance Query

    Credits and Debits should not be separate fields. Combine them into an [Amount] field. Then the simplest solution is to use negative numbers for credits and positive for debits. Or if you want to classify your transactions (Deposits, Checks, Card, ATM, Interest, etc.) you could add a...
  18. P

    calculating amount of time played.

    Your sessions aren't explicitly declared? That's an issue if so. If you could mark which session each tournament belongs to you could do this with just SQL (in a query). Without that you'll need VBA to iterate through all records to determine which each belongs to Also the start date and time...
  19. P

    Replacement for Outlook

    Been using Thunderbird at home for 15+ years. No bad things to say about it.
  20. P

    We Should Have Contest of Who is the Most Outraged by Trump's Win

    I hope this guys got his passport in order and has exchanged his money. Yes, post them all.
Back
Top Bottom