Autopopulation of field in table based on entry in second field. (1 Viewer)

zoobeeda

Registered User.
Local time
Today, 15:07
Joined
Mar 30, 2014
Messages
28
Please see attachments.
 

Attachments

  • 1 POST.zip
    384 KB · Views: 80
  • 2 database.zip
    58.8 KB · Views: 69
Last edited:

jdraw

Super Moderator
Staff member
Local time
Today, 18:07
Joined
Jan 23, 2006
Messages
15,422
Try this

Code:
SELECT MainTable.ID, MainTable.Item, MainTable.Weight, MainTable.BarRank, RankTable.NumberRank
FROM MainTable INNER JOIN RankTable ON MainTable.BarRank = RankTable.BarRank;

Questions for you:

Why do you have NumberRank in both tables? You are trying to find the corresponding NumberRank from BarRank, aren't you?

Also, when posting in the forums it is best to have a description of WHAT you are trying to accomplish in plain English. And an overview of what you have tried and any error messages that you have encountered.

Few people will open attachments, and fewer still will read them.

Good luck with your project.
 

zoobeeda

Registered User.
Local time
Today, 15:07
Joined
Mar 30, 2014
Messages
28
I have NumberRank in both tables because:

1. in MainTable, values in NumberRank will vary from record to record
2. RankTable lists all possible values for NumberRank and the corresponding values for BarRank, which gets sourced/copied into MainTable.

I don’t know how to otherwise do what I intend to try and do. I’ve been told on this site (in another thread with a project that is similar) to put the ranking values in a separate table and draw values from it.

Thank you for pointing out that few people read attachments. I thought that having images alongside text would help in clarifying what I’m trying to say and minimize narrative. Is it a fear of viruses that keeps people from opening attachments?

I’m trying to do my best to explain my ideas as clearly and concisely as I can with an English that I thought was clear and straightforward. I’m not sure how to change my writing to be more “plain English”. I'm not familiar with tech wiz jargon. I'm a newbie.

I just took the above code and stuck it in my query and the autopopulation didn’t work. I don’t quite know what to do with it otherwise.

What is INNER JOIN . . . ON ? Is it a function?
 

JHB

Have been here a while
Local time
Tomorrow, 00:07
Joined
Jun 17, 2012
Messages
7,732
It is impossible, you can't autopopulation a field depending on a value in another field, at table level.
What you can is, run an update query at that table after the input is finish.
Or you can use a form to fill in the data in the table.
But why do you want to store the value of NumberRank in the table?
You've the BarRank and using that value, it is easy to get the value of NumberRank when you want to use it later.
To store both BarRank and NumberRank is more or less to store the same value twice.
 

jdraw

Super Moderator
Staff member
Local time
Today, 18:07
Joined
Jan 23, 2006
Messages
15,422
zoobeeda,

You need to do some tutorials related to Database and Access.
Here is a link to Crystal's Access materials. It has helped many.
Complete set of tutorials on Acc2010.
https://www.youtube.com/playlist?lis...FoilxbUY0yUqZP

INNER JOIN should not be foreign to you. Use Google to get answers.
A good reference for Access functions is www.techonthenet.com

By simple plain English I mean, tell us WHAT you are trying to do just as you would tell someone who doesn't know you, doesn't know database or Access --just as simple as can be without any technical jargon.

Good luck.
 

Users who are viewing this thread

Top Bottom