Search results

  1. M

    IIF using Min function

    The query returns 2 Month1 values. They are always different, so there is always a Min or Max. The code I am using is: Month ID: IIf([Month1]=Min([Month1]),1,2) I want to return a 1 if it's the min and a 2 if it's the max. The query always returns a 1, presumably because it is only checking...
  2. M

    Join tables even if records don't match

    ^^ Nevermind :rolleyes::rolleyes::rolleyes: Thanks for letting me sort that one out. Damn you, Monday!
  3. M

    Join tables even if records don't match

    Ok, but if there are records in the TY table I need to see those Line, Plcds. So, how do I write the join query to only return records for the year in which there is data...? Not sure if I am explaining this right so I'll add another picture...hopefully formatted properly this time :D This...
  4. M

    Join tables even if records don't match

    How about the SQL to start? SELECT tblGM_MTD_LY_LP.LINE, tblGM_MTD_LY_LP.PLCD, tblGM_MTD_LY_LP.[Cash GM] AS [LY Cash], tblGM_MTD_LY_LP.[Charge GM] AS [LY Charge], tblGM_MTD_LY_LP.[Total GM] AS [LY Total], tblGM_MTD_TY_LP.[Cash GM] AS [TY Cash], tblGM_MTD_TY_LP.[Charge GM] AS [TY Charge]...
  5. M

    Query to find criteria then run

    So, this works great as I said before. However, I forgot to mention that I am using this for a Year-to-date query i.e. I need it to return the same dates for Last Year as well. This is something I've been meaning to learn for a while - How can I take a Date field record and return the same...
  6. M

    Join tables even if records don't match

    Ok, the recordset looks good. Seems to be doing what I want it to. One issue, however: Where records are populating without a Line and Plcd, but still have data. Not sure if I left something out... If the embedded image doesn't work: http://i.imgur.com/RdWnE.jpg
  7. M

    Join tables even if records don't match

    :( Ok, I'll try the union method. Thanks.
  8. M

    Join tables even if records don't match

    I'm not sure my title was appropriate. I have two tables - Table1 has This Year sales data, Table 2 has Last Year sales data. The data is grouped by Line and Plcd. So, when Line and Plcd from Table1 matches Table2, I need to subtract This Year Sales from Last Year Sales. However, if there...
  9. M

    Query to find criteria then run

    Just had to switch TableName and Date_ID and it worked perfectly! Thank you. Between DMax("Date_ID", "TableName") + 1 And Date() - 1
  10. M

    Query to find criteria then run

    I need my sales query to search an existing table for the highest instance of Date_ID, and then run the query for all dates between the day after Date_ID and yesterday. Will I need VBA to look up and store this value? Either way, how can I do this?
  11. M

    Database is huge, help

    I've been known to have tables that big :cool: I'm sure I'll track it down. Thanks for the help!
  12. M

    Database is huge, help

    No images or other. And most of the larger tables are stored on the backend. I think that I ran an overly large make table query one day, and if I could look at my tables by size I could easily find it.
  13. M

    Database is huge, help

    Yes, I've done several today. Each one after I find and delete and old, unused table. I'm still at 1.2 gb.
  14. M

    Database is huge, help

    How can I find which objects are taking up so much space in my db? Is there a way to sort by size?
  15. M

    Query referencing subform issue

    Awesome, worked like a charm. Thanks again, Bob.
  16. M

    Query referencing subform issue

    I need my query to reference a combo box on the subform when the main form is open. The subform has 2 fields: Line, Item which are combo boxes sourced from queries. When the user selects a Line, I need the Item cmbo to restrict itself to values based on the Line selection. This works fine...
  17. M

    Auto-entering 0 in combo box

    Hmm, could still use some advice here. :)
  18. M

    Auto-entering 0 in combo box

    It is a data entry form, where the user is given a store number to input, and so there is no reason to see the "name" which these stores don't have necessarily. How can I arrange for the default to be blank? This seems like the simplest way to accomplish my goal. Edit: Also, since you're...
  19. M

    Auto-entering 0 in combo box

    On my main form I have a combo box that is bound to a field Store_Num, and whose record source is a select query from an ODBC table containing Store related data. When entering a new record in this field, Access automatically adds a zero to the end of the entry. The query is limited to...
  20. M

    Adding PK as FK to table

    Thanks, Bob. I was acting under the assumption that Alert_ID would be added to tblProducts automatically and that I did not need to actually append it manually... So, I just made a quick join and appended Alert_ID from tblAlerts to tblProducts and we are in business! :)
Back
Top Bottom