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. lartigue64

    Updating a table with a Count() of another table

    ok, i found the solution. I used a DCount to get the count and then put the variable into my insert statement. thanks everyone for your help.
  2. lartigue64

    Updating a table with a Count() of another table

    The select part works fine outside of the insert statement. As I changed the field names here for simplification, its not a problem with the field names being reserved words. Maybe you could help me with a DCount or Dlookup, i've been looking at these, but not quiet sure how they would work in...
  3. lartigue64

    Updating a table with a Count() of another table

    delimiters are correct according the the field type. i'm really at a loss here! how frustrating!
  4. lartigue64

    Updating a table with a Count() of another table

    I thought of that also, and changed it, and am back to the original error. I've thought of breaking this up into two seperate queries, one where i insert area, timeperiod, year, type into the table and then one where i would update the row inserted with the count. but i haven't been able to do...
  5. lartigue64

    Updating a table with a Count() of another table

    ok, i added the field list, so now my query looks like this: INSERT INTO table_stats (Area, TimePeriod, Year, Type, Number) VALUES ('AREA1','January', 2007,'typeA', (SELECT Count(ID) FROM table1 WHERE [Area]='AREA1' AND [SalesDate]>=#1/01/2007# AND [SalesDate]<=#1/31/2007# AND [Type]='in'))...
  6. lartigue64

    Updating a table with a Count() of another table

    I'm working with a table of sales, and I'm trying to come up with a way of populating a second table that I will use to report the statistics. ie, the number of sales by area and type for a specific month, quarter or year. I'm trying to build a query that will fill the statistics table, but...
  7. lartigue64

    Controlling that a selection is made in a combo box

    ok. i fixed it by setting the focus to the combo, then testing If Me.sel_Period.Text = "" thanks for your help!
  8. lartigue64

    Controlling that a selection is made in a combo box

    I have a form with a two combo boxes, one for the month and another for the year. Then there are several buttons that when clicked, will run a query based on the month and year selected in the combo boxes and then open the report that corresponds to the button. I'm trying to add a control so...
  9. lartigue64

    type mismatch on recordcount

    ok, so i applied all the changes that you suggested, by the way your median function doesn't work if there is only one record returned. and with the dcount function i was able to use the insert into with values(...) so that simplifies this a lot. and things seem to be working fine. thanks a...
  10. lartigue64

    type mismatch on recordcount

    ok, thanks for your help. i'll see what i can tidy up tonight and let you know how things go. thanks again for all your help!!
  11. lartigue64

    type mismatch on recordcount

    interesting... i opened my link to make sure it worked, and ran it, and it went through the median calculations, and i got a type mismatch later on... so maybe the problem isn't in my median function? anyways let me know what you see.
  12. lartigue64

    type mismatch on recordcount

    ok, i created a new mdb, with just the tables and form that calls the code in question. the form called frmUpdate fills in the table tblVacants with the information from Vacants2007, calculating medians and giving counts for each time period. i really really appreciate your help!! (and any...
  13. lartigue64

    type mismatch on recordcount

    I added Option Explicit. the recordset is defined as a DAO.Recordset I ran the compact and repair. Same thing as before. It seems to stop after the set ssmedian line. (I did add an error to see what it would do, I added a variable that wasn't defined, just a random thing, and it did at...
  14. lartigue64

    type mismatch on recordcount

    I can't get a recordcount on other recordsets if i substitute for example "Select * From Vacants2007" in my openrecordset statement. Where do you find compact and repair? Where would the libraries be marked missing? In the references window? If so, it doesn't look like it...
  15. lartigue64

    type mismatch on recordcount

    ok, that was actually my error in copying the code here. i forgot to copy in that line with the 'from tablename'. your median calculation is slightly different but comes to the same thing. for some reason my access is no longer giving me error messages. the macro just stops. so i've been...
  16. lartigue64

    type mismatch on recordcount

    Hi, I have a function that calculates the median of a selection of values. This function worked fine in November when i ran the report, but in December it didn't run. It seems that i suddenly have a type mismatch error in my Median function when i try to get the number of records selected. I...

Part and Inventory Search

Back
Top