Search results

  1. S

    Are certain table relationships redundant?

    Pat, Thanks for the advice. Upon reflection and taking into account everyone's advice I have changed the structure of this section. I should note that this is a re-build of an existing (working) database I had created that requires more functions with slightly different business rules, hence...
  2. S

    Are certain table relationships redundant?

    Cheers Dave, I should have mentioned that I have RI enforced on all my relationships with cascade update turned on. I, too, am uneasy with the cascade delete option and never use it, prefering to handle my own deletes (and backups!)
  3. S

    Are certain table relationships redundant?

    Thanks CJ, I need to think more along the lines of "These are child records that cannot exist directly without the parent records in this table" rather than "These two field names match!!". Ideally I would use a single autonumber primary key and a multi-index, and I indeed I have in other areas...
  4. S

    Are certain table relationships redundant?

    So I thought about this for a while before posting and couldn't seem to grasp it. But after writing it out with an example and thinking further I think I have answered my own question. When using BonusID and PeriodID as a compound key I am essentially mimicing creating a new key such as...
  5. S

    Are certain table relationships redundant?

    Hi all, I am designing a new database and trying to do it properly. Just getting my head around table relationships... are ambiguous joins redundant? Do I need to create a relationship in every table wherever a foreign key appears with the parent's parent table primary key? i.e. in the image...
  6. S

    VBA : Join Functions (Strings, Collections, Arrays, Ranges)

    I have just finished rebuilding my join functions to implement recursive behaviour (where the function calls itself), an idea taken from my recent build of a function that joins Excel ranges together. These functions mimic the behaviour of the Join() function which joins an array of strings...
  7. S

    A Mathematical Question!

    A very quick explanation (as it's probably off-topic) would be that using A MOD B to find the GCD is a short way of doing the original 'subtract smallest from largest' method from 300 BCE. We know that GCD(35, 10) = 5 by inspection (35 = 5 * 7) - (10 = 5 * 2) = (25 = 5 * 5) (25 = 5 * 5) - (10 =...
  8. S

    A Mathematical Question!

    For further reading (sorry I like maths ;) )... Logarithms and Exponential are two sides of the same coin, like Multiply and Divide. My method for remembering the relation is (sorry there's no sub/superscript): Base ^ Exp = Ans <=> Log[Base](Ans) = Expe.g. 26 ^ 2 = 676 <=>...
  9. S

    Outlook Web App OWA Forwarding Rule Not Working

    Hi, I have a corporate email address, e.g. stormin@work.com, of which I want to check if emails are getting through to. Some incoming attachments cause external emails to fail to be delivered to this address. They are caught at the company's firewall and the sender gets a Delivery Fail message...
  10. S

    Update / Refresh TableDefs, or Count All Records in a Table Multiple Times

    Maybe; however shouting into an empty room would give the same result ;) I actually read that article in my research (there are a few more people that have conducted similar experiments) which is what contributed to my conclusion that scanning the recordset was the best approach for my application.
  11. S

    Update / Refresh TableDefs, or Count All Records in a Table Multiple Times

    Explicitly declaring the database being better practice is a general attitude I've picked up from bits and bobs I've read all over. A search through my history provided one example here. Another advantage seems to be to avoid ambiguous declarations between DAO and ADO, as mentioned on Allen...
  12. S

    Update / Refresh TableDefs, or Count All Records in a Table Multiple Times

    Hi all, When importing files to my Access tables I keep track of how many records have been added / removed at each stage by counting the number of records at different points and then finding the differences where I'm interested. When I designed my import function I used...
  13. S

    Measuring performance of each part of large query

    Thanks. I guess I was thinking if there was an 'order of operation' like you can find inside .xlsx files for calculation chains. I that case I will brute force it and time every query individually, then draw a flow chart for my output queries and optimise from there. Thanks for code Ranman. I...
  14. S

    Measuring performance of each part of large query

    I have a db that takes a lot of 'dirty' imports from different systems. I have a lot of queries and reference tables that comb through the data, clean it up, fill in missing data, run calculations, and transform it into a unified format. Some of the 'final' select queries run quite slow. For...
  15. S

    The purpose of the variable after "Next"

    I was thinking more along the lines of are there specific circumstances where you must specify the counter in order for the code to work properly? I can't think of any. If not I guess the only advantage is, as you say, for the reference/readability.
  16. S

    The purpose of the variable after "Next"

    Hi all, So I've wondered this for a while but cannot find any answers on Google due to the keywords being too general. With a For...Next loop I've always specified my variable after the "Next" statement e.g. For i = 1 to 5 Debug.Print i Next i or For Each i In myArray Debug.Print i...
  17. S

    Decompile : general rule of thumb?

    I actually use a separate Excel file instead, that way I can preserve my log if I have to roll back or something bad happens to the db. As Doc says, it's literally just a small table that has the version number (e.g. 4.2.006), date, author, and description/list of changes made for that version...
  18. S

    Decompile : general rule of thumb?

    I'm no expert either, however I have a db that is in development but also is semi-live (being used but not a finished product). I have the version number in the database name in options > current database. I keep all version history and any changes I make in a changelog, and I backup the...
  19. S

    random number with exclusion

    ridders is correct. You can also do this: Sub TestRndGen() Dim ilwb As Integer Dim iUPb As Integer Dim iout As Integer Dim itmp As Integer ilwb = 1 iUPb = 9 iout = -9999 If iUPb < ilwb Then MsgBox "Upper and lower bounds are incorrect."...
  20. S

    Changing all ZLS in a table to Null

    Thanks for the extra info Doc. dbText worked for me with the bog-standard Access 2010 installation. I need my databases to run on colleagues machines with the same installation (without fiddling about) so I tend to use CreateObject() instead of adding libraries.
Back
Top Bottom