Thanks for the tip, I managed to create an update query, which is something new.
My need is a bit specific though - I want to update only one record at a time, based on my form's combobox value.
Can the update query's criteria filter records like so?
you 'just' set the update criteira correctly using a where clause...
bearing in mind that every table in a fully realtional db will have a primary key which by defintion is unique you specify that primary key
SQL itself doesn't care on how the records are filtered or limited it applies whatever changes you want to what ever records pass the criteira you specify
so update products set price = price * 1.175 .. means update all products by 17.5%
if a manufacturer announced an accross the board price increase on their products of say 10%
update products set price = price * 1.1 where manufacturer = "ronh corp"
if you wanted to change a specific item then you would need whatever makes that record unique...
it could be your internal porduct no
update products set price = price * 1.175 where productno=12345
it could tbe the manufacturers stock number
update products set price = price * 1.175 where manufacturer = "ronh corp" and manufacturers stockno = "abc12345"
it could be a product description
update products set price = price * 1.175 where product description="super duper widget"
it all depends
but make no mistake its far easier to use the rows priamry key.. there is less risk of problems
I used the function RunSQL and it worked (sometimes I just need to rtfm), thanks.
George- The database practically logs tests I do. There are several different offices I do the tests at, and each one of the offices has a private counter for the number of tests done in that particular office (since the beginning of the year).
So basically I distinguish between the tests by giving every on of them 3 variables:
[offices private test counter] , [office name] , [year]
Or for example, "Test16, Office1, 2007".
What I currently have is a table that lists the office names, and the tests counter for each one of the office. If I'm doing something very wrong I will certainly appreciate design tips.
If you are storing the office name against the test then you immediately know the number of tests done at that location
SELECT Count(officeName) As [numberOfTests]
WHERE officeName = 'Glasgow Branch'
Therefore using a calculated field is not only pointless - but may cause innacuracies because it relies on application code to retain integrity!
(What would happen if you entered a test against the Glasgow Branch by mistake - so you adjusted it to the Leeds Branch, or even deleted it and created a new one for Leeds?
If any of what I have said doesn't make sense - please ask questions! I am more than happy to explain if needs be