Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. RivetHed

    count() last 12 months

    Something like: Select cast(year(MyDateField) as varchar) + cast(month(MyDateField) as varchar) as Month, count(Sales) as SalesTotal From MyTable Where MyDateField > 'Whatever Date' Group By cast(year(MyDateField) as varchar) + cast(month(MyDateField) as varchar) Should do it I think
  2. RivetHed

    Add one record to two different tables with one form

    I'd say the easiest way would be to unbind the fowm from the table and then set the save record button code to something like: dim db as database dim rs as recordset set db = currentdb set rs = db.openrecordset("MyTable1") with rs .addnew !MyField1 = txtbox1 !MyField2 = txtbox2...
  3. RivetHed

    Time Values - counting ranges

    Glenn, correct. Completely forgot Excel had that function, that simplifies the formula a bit.
  4. RivetHed

    Time Values - counting ranges

    Can't see your spreadsheet but do you just want a formula to stick in an extra column to make the counting easier or a big array formula to calculate the whole thing in one go? If the former then something like this should give you a 1 or a 0 for those who arrived early so you can run a count...
  5. RivetHed

    Bound Check Box Visible/Enable Property on Continuous Form

    That's the way continuous forms work. Remember that you only have one checkbox. You can see lots of them on the screen but they are all the same checkbox so you can't have some enabled and some not.
  6. RivetHed

    Create tables from excel using VBA

    Yes you could generate the tables with that spreadsheet. It's hard to know exactly how to code it without seeing the layout of your data though so post it up, also have a read up on Tabledefs in VBA help and on this forum as a starting point.
  7. RivetHed

    Copy & Paste Named Ranges

    Try: Range("MyRange").Rows.Count to show you how many rows are in there.
  8. RivetHed

    Copy & Paste Named Ranges

    Yup, it's normal for dynamic ranges not to be listed in the edit>>goto box. If you reference it through VBA or if you type the range name into the cell reference box at the top left they'll work though.
  9. RivetHed

    Copy & Paste Named Ranges

    Ah, misunderstood your question, thought you were trying to copy a range with the same name from one WB to another and paste as values rather than just pasting an existing range as values within 1 WB.
  10. RivetHed

    Copy & Paste Named Ranges

    Hi, You need to tell it which workbook the names are in. Try something more like this: Dim WB As Workbook Set WB = Workbooks.Open(Prev_PSC_Filename) WB.Range("Previous_PSPD").Copy ThisWorkbook.Range("Previous_PSPD").PasteSpecial xlPasteValues WB.Close SaveChanges:=False Set WB = Nothing
  11. RivetHed

    Excel Worksheet Change Event Problem

    Help files would indicate that they should recalc whenever the input changes. Should be relatively simple to force calculation in any case.
  12. RivetHed

    Spreadsheet writes file to same location issue

    ThisWorkbook.Path will give you the current directory of the workbook.
  13. RivetHed

    Excel Worksheet Change Event Problem

    Geoff, it worked! Have a very well earned star. Chance, thanks for your time as well.
  14. RivetHed

    Excel Worksheet Change Event Problem

    Chance, it's commented out and still not producing any errors.
  15. RivetHed

    Excel Worksheet Change Event Problem

    Chance, I've temporarily removed the call to the GetDataCol function so that's not the issue. All error handling has been removed while testing and no errors have been thrown out. And yes I am changing a cell on the same worksheet the change event is firing from, that's why it disables events...
  16. RivetHed

    Excel Worksheet Change Event Problem

    Aha, you're right it is firing to the XLDateAdd function first. Yes I do have Indirect and Offset being used in the workbook and thinking about it some of those indirects will be referencing the cells in question. Any ideas on why this is cauing a problem only in certain circumstances? I've...
  17. RivetHed

    Excel Worksheet Change Event Problem

    Chance, Unfortunately yes there are some merged cells but they're all in a row that's not referenced by any formulas or code.
  18. RivetHed

    Excel Worksheet Change Event Problem

    Geoff, No the cell in question isn't referenced by any formulas at all, neither is the cell I'm changing to fire the event and the whole procedure runs perfectly when values are typed into the cell.

Part and Inventory Search

Back
Top