Help needed on Up-date Query!

atiq

Registered User.
Local time
Today, 22:48
Joined
Apr 11, 2007
Messages
23
i am trying to update a field within a table. But i dont want to update the whole of the data within the field just one part of it.

The field is the Tutor Group for students in the format 7B, 7D, 7F, 7H, 7M, 7S, 8B, 8D, 8F,... etc where the number represents the year group! i want to use an expression that would add(+) 1 to the year group but leave the letter the same as this doesn change. By doing this the above list would change to 8B, 8D, 8F, 8H, 8M, 8S, 9B, 9D, 9F, ...etc

I attempted to use the following expression: ((*)+1)(*) but it didn't work.

I should have had the year groups separate but i am given an Excel flat file which has details of the students and doesnt separate the the two.

any help would be much appreciated! hope someone can help!
 
Something like this should work
Code:
(CDble(Left([Tutor Group],1))+1) & Right([Tutor Group],1)
 
Hello atiq!

Look at "DemoUpdateQryA2000.mdb",
Look at Table1, run Query1.
 

Attachments

The DemoUpdateQryA2000.mdb works fine until the year group 9B changes to 10 because it doesn't add the letter B. Try updating it 2 times and check the table because the Tutor group doesn't include the letter the any more. if you could sort this problem then the problem would be solved! hope u can sort this out! Thanks for your help so far.... cheers
 
That's only because the field size is limited to 2 characters. Increase the field size and all should be well.
 
Thanks

That's only because the field size is limited to 2 characters. Increase the field size and all should be well.

Thanks. problem solved! ur a hero.
 

Users who are viewing this thread

Back
Top Bottom