Auto enter value

H

HilcrRWise

I have two tables:

Table 1
Subject, SubjCode
Maths, Ma
English, En
Science, Sc
etc (about a dozen subject names)

Table 2
TeachSet
7En1
8En2
9Ma1
10Ma2
11Sc1
etc (over 100 similarly formated values)

What I want to beable to do is add a second column to table 2 calle
'Subject'. This column needs to be automatically filed with th
appropriate subject name by looking at the two letter subject cod
incorporated within the TeachSet value.

How would I go about doing this.

Thanks
 
K

Kevin McBrearty

HilcrRWise,

The only way that I can think of for doing this would be write VBA Code and place it behind the form you are using to enter select the information.

If you are not familiar with VBA I could try to help you out.

Thank you,
Kevin McBrearty
 
T

Tim Ferguson

What I want to beable to do is add a second column to table 2 called
'Subject'. This column needs to be automatically filed with the
appropriate subject name by looking at the two letter subject code
incorporated within the TeachSet value.

How would I go about doing this.

I think you need to go about redesigning the second table. You seem to have
(at least) three different items of data stuck into one field, so perhaps
the table should look more like this:

SetNumber Subject Level
7 En 1
8 En 2
9 Ma 1
10 Ma 2
11 Sc 1


Once you have a normal design (pun intended), it's child's play to join
this to the first table to get the full SubjectDescription.

You can use an UpdateQuery to shell the various parts out of the malformed
TeachSet column using Left() and Mid() and so on.

Hope that helps


Tim F
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top