Search results

  1. T

    Problems with "{" "}"

    If that data is stored as a GUID datatype there are two inbuilt functions GUIDfromString() and stringfromGUID() That might help.
  2. T

    Run Time 3075 error on combo filter

    Glad you got it sorted and thanks for posting how you fixed it
  3. T

    Kindly Sugesst

    Another option is BETWEEN i.e. SELECT table.column FROM table WHERE table.date BETWEEN #01/01/2011# AND #01/02/2011#
  4. T

    Looking through 1 column of a recordset

    I'd still use a query. I'd go as far to opine that a Function that took your string "err1 - 5 to 10" and worked out the correct value might be appropriate, but some more context about what that string actually means, and what values it might actually be would be useful. Recordsets are...
  5. T

    Looking through 1 column of a recordset

    Still doesn't alter the fact that the best way to update/insert one table based on the contents of another is a Query. You can do the whole lot in one go, no looping, recordsets or other shenanigans required. You don't need any check on the field(s) per row at all. You have a fixation with...
  6. T

    Update table via VBA code

    Dont update tables using VBA, update tables using queries. Use VBA to control the use of the query. What does that query need to update? Where does it get the data needed to perform the update from? ie. user input, criteria from another table? When and how should that query be run? i.e...
  7. T

    Pb link between tables and primary key

    http://www.databasedev.co.uk/many_to_many_example.html - seems fairly comprehensive and is based on Access. A junction table is just a table with two one-to-many relationships. Create the Syndicate table Add SyndicateID, autonumber, indexed no duplicates DealID, Long Integer BankID, Long...
  8. T

    Pb link between tables and primary key

    It sounds like "Syndicate" is functionally a many-to-many relationship. One deal can have many banks in its syndicate, and one bank can be a part of many deal syndicates. Your deal table as described is not currently sufficiently normalised. [Borrower] represents a relationship to a Customer...
  9. T

    Looking through 1 column of a recordset

    Obvious question time.... Why not just use a query? On a more practical note, you run the INSERT query twice because of the FOR loop which runs the query once for every column in your recordset.
  10. T

    Question Calculation Accross Tables...ish

    You can nest NZ as per the example above (note the second NZ to cater for the second column also potentially being NULL). a JOIN does exactly what it says on the tin, it JOINS One or more tables together. I hope you'll forgive me, but I don't intend to rewrite the reams of information on...
  11. T

    HELP! Querry is pulling incorrect information

    The other less palatable alternative is that someone's managed to get an UPDATE query wrong and accidentally set all company names or references to the company table to point to the same company. Check the contents of the table(s) as well as the query that now doesn't work. As John says...
  12. T

    Select Query - Max

    You should be able to do all of that in one query. SELECT wcode, AVERAGE(attendance), MIN(attendance), MAX(attendance), SUM(attendance), Count(wcode) FROM tblAttendence GROUP BY wcode The GROUP BY, does just that, so you've got your many records for each workshop in your attendance table, so...
  13. T

    Numerical Order

    There needs to be a sarcasm smiley. You're in the thread that explains how to sort things, the person not giving much information away so far is you. "So you can't sort stuff" isn't much to go on, not to mention inaccurate. If you've set the column to text then sorting will act differently...
  14. T

    data intervals query

    This is also the third post from you asking exactly the same question, I know I responded to at least one of them with a method to group your data into first half and second half of a year.
  15. T

    Numerical Order

    Yes, it's called ORDER BY, there's a whole thread around here somewhere that explains in detail and with numerous examples and considerations how to sort data, I wonder if I can find it....
  16. T

    Finding the highest value

    It does highlight an issue using variables in this manner, you only assign something to it if one half of the test is true (the character is a number) so you have to remember to reset it if the condition is false. Both TempValue and for that matter the IF statement are unnessary, you could just...
  17. T

    Finding the highest value

    Just spotted and edited my previous post :D
  18. T

    Finding the highest value

    The only one there that looks wrong is the last one, how is 4 getting set? Look at the strings that you're comparing there. (-5) 3 and 4 contains a 5 (set) a 3 (set) and a 4 (set) (-5) 2 And 3 And 4 contains a 5,2,3,4 all of which are getting set. (-5) 2 and 3 Not sure here Where the 4 is...
  19. T

    Finding the highest value

    The obvious point to make is that you never reset the variables back to 0. The other is that only Option5 is an integer, the rest are variants. Dim opt1, opt2 as Integer Only sets the last variable as an integer datatype, because nothing is specified for Opt1 it's a variant. TempValue is...
  20. T

    Question Calculation Accross Tables...ish

    I'm not convinced by the table structure, but I digress. A simple NZ function should do what you want ie SELECT tblStock.[StockValue] * NZ(tblpercentages.[FinalPercentage], NZ(tblpercentages.[estimatedPercentage], tblpercentages.[offeredPercentage])) as FinalOuput FROM tblPercentages INNER...
Back
Top Bottom