Help with automatically filling in field

shaley86

Registered User.
Local time
Today, 06:57
Joined
Feb 6, 2012
Messages
15
Hi,

I am modeling a new database after an old one. There are a couple of fields called "Subject Code" and "Subject." In the old database, when you type in the Subject Code, the Subject automatically pulls up, without having to type it in. In my new database, I can't get that to happen; I'm having to type in both the Subject Code AND the Subject. I have a "Subjects" Table set up that has both code and subject have been entered into. I have checked in the Data Property Sheet, and the Control Source and Row Source match up in both the old and new databases, yet the new database I'm creating still doesn't automatically pull up the Subject after typing in the Code. Very frustating...what am I missing?!

Thanks
 
That still does not work for me...Is there any way that I can email you my database?
 
It's declining it, it's too big - 5600 Kb, even after I compacted and repaired and compressed the file. Any way you can private message me your email and I can send it that way?
 
You said it "does not work", but I'm not seeing anyplace where you've got the code.
 
I would add that the subject code combo on the form that comes up does not include the subject field in the row source, which it would need to use the technique in my link.
 
Hi, I did that but did not save it as it did not work for me...could you try it?
 
Added the subject field to the code combo's row source query, adjusted the column count and width's properties and added the code and it works as expected.

Me.Subject = Me.Subject_Code.Column(1)
 
Paul I don't know what I'm doing wrong, I tried doing that again it's still not working!!!!...can you send me back my database with the changes noted you speak of? I would like to compare it to the one I'm working on and see where I am going wrong. Getting super frustrated with Access!!!
 
Sent, but next time post the db with your effort in it. I prefer to fix the error than do it for people.
 
Questions should be kept on the forum so an archive is created. From your email:

I copied your "Format" and "Data" information in the Subject Code form property sheet, as well as the Subject form property sheet. Then, I made my info matched to yours in the "Lookup" Field Property Box in the Training Data:Table for both Subject Code and Subject.

STILL doesn't work on mine!!!!!! What am I missing? I can just use yours, but I still don't know what I'm doing wrong.


The properties of the combo look right now, but there is no code in the after update event. This is how to get it there if you're unfamiliar:

http://www.baldyweb.com/FirstVBA.htm
 

Users who are viewing this thread

Back
Top Bottom