Search results

  1. T

    Query layering - best practice

    All, My database is fairly complicated and requires a lot of data manipulation. Being a novice my approach has been query on top of query on top of query to get the data into the shape I need. So the question is best practice on eliminating some of these queries. I'm not sure if a stored...
  2. T

    Key field best practice

    Thank you very much for the help. This all makes sense.
  3. T

    Key field best practice

    Hello all, General question. If a table is populated with a text or value field that is truly unique is it still better to use auto-numbering as the key? ... and ... if the source data is OK as the key, is that conditional based on data type (e.g. a unique number is more efficient or better...
  4. T

    Calculate between different records

    I think you suggested a dlookup - if I create a unique identifier for the record (the concatenated Account_ID & Security_ID then maybe the dlookup would search for the date
  5. T

    Calculate between different records

    I think you are right, the query you suggested might not work. The table will not necessarily have the records in an order, so if that is a requirement this may be tricky. I attached the database with sample calculations in 4 records in the table so you can see what the math should be...
  6. T

    Calculate between different records

    Thanks again for your help. There is still something (probably small) that I cant get. I attached my DB - if you could look at the results of your query you will see. I changed the field and table names form your query but everything else is the same. I really appreciate your time and help.
  7. T

    Calculate between different records

    All, Thanks for the input but it is not quite what I need. Sorry if I was not specific enough and I see how my example was confusing. Your example (thank you BTW) is for a user entering the from and to dates on a form, and those dates controlling the records selected. I need more of a...
  8. T

    Calculate between different records

    The file you included is only downloading as PHP even though the file name has an Access DB extension. Any thoughts?
  9. T

    Calculate between different records

    Thanks again. Some of my queries will be much more complex and involve more data so I'll check both ideas and see. I really appreciate the help. If anyone else has any alternate ideas I'd love to get them and compare. Much appreciated.
  10. T

    Calculate between different records

    Interesting idea. Let me check that when I get back to my laptop but i get you point from your description. The database I'm working with will have a LOT of data and speed is an issue. Is this type of approach any faster/ slower than others? You said you don't normally use this approach and...
  11. T

    Calculate between different records

    I’m sure this is silly for some of you, but I’m making the slow transition from the Access UI to writing SQL and I need help with the following concept. I need to do calculations on data that looks like this: 4 distinct records with the same value in different periods: Date...
  12. T

    on demand query refresh

    Maybe the following is a better question to help me understand this broadly. The forms and reports I have point to a few selected queries, so that a single massive query can service a whole bunch of forms and reports. The obvious advantage is that is I chance a calc that serves multiple...
  13. T

    on demand query refresh

    Thanks for your help on this guys. I think I'm starting to get this through my thick head. I always assumed that all queries are auto refreshed when the underlying table data is refreshed. At least that is what it felt like based on my (probably lousy) query design. Since I want the...
  14. T

    on demand query refresh

    Thanks ken. I'm sure the question is confusing. Simple response for now: I have a big database with a load of queries that calculate everything under the sun. The underlying table data is changed occasionally which seems to auto-trigger all the queries to recalc. Issue is: I only need to...
  15. T

    on demand query refresh

    Is it possible to have query update only on demand and not automatically? I have a big database and some are best run overnight. Thanks
  16. T

    Calculating the difference in values in two different records

    thanks. I sorta figured.
  17. T

    Calculating the difference in values in two different records

    Note sure what the best way is to do this. I have a query that must calculate the different between values in two different records, based on the date. The underlying ORIGVALUES table contains: Date; Value; Diff 1/10/15; 100; (this is what I am trying to calc) 1/11/15; 101; (this is...
  18. T

    Selecting only the Max row through SQL

    A query TaxType_Query produces the following results TaxType; FromDate; ContactID, FullName W2; 7/1/15; 1, Tom 1099; 4/1/15; 1,Tom W2; 1/1/15; 1, Tom W2; 1/1/10; 2, Dick 1099; 1/1/09; 3, Harry I need the query to show only the rows with the maximum FromDate for each ContactID (result would...
  19. T

    Populaing only the Key field value form a combo box selection

    Thanks for the help. Issue closed
  20. T

    Populaing only the Key field value form a combo box selection

    In the Contacts Table there are two fields, the unique Contact ID key field numeric and the Contact Name. Like this: Contact_ID; Name 1; Tom 2; Dick 3; Harry In a form named “Selection” there is a Combo box that references the Contact table, and lists just the three names in the drop down...
Back
Top Bottom