Auto Fill form from another source table, populated in a sub

O

Oopesh

Hi,

I hope that someone could possibly shed some light on this subject a
I have been battling the last 2 days to Figure this out.

I have 3 tables

1. Staff Tabl
2. NQF table
3. Course Table

I have created a Form for the staff details and added in a subform fo
the NQF table. (That works like brilliantly).

So basically you will fill in the staff form (Unique Staff ID) an
than you will proceed to complete the NQF table (Which is linked t
Staff ID as Unique key

I added in the course table because I am trying to avoid people typin
in incorrect information and the hopes that I could link these som
how.

The Course table has a listing of different training courses, i
comprises of the following fields: Course ID, Course Description, NQ
Level and NQF credit.

Now What I am trying to do is when you complete the staff table an
proceed to complete the NQF subform, when You select the course Cod
from a drop down menu, I want to automatically read the course tabl
and fill in the Course Description, NQF Level and NQF credit. Onc
the record is processed, it will update the NQF Table

I have ensured that all primary keys are in check and that th
relationships have been set, but I can’t seem to get it to Populate
autofill that information reading from another table ....

Can anyone please shed some light or guide me in the righ
direction....

Your assistance will be greatly appreciated.

Thanks and Regards,
Oopes
 
O

Oopesh

Hi Again,

I manage to find a sample on the net, but For some reason it onl
partially works ...

I created a Query for my Course Table, and copied some code an
started changing it to the critera of my Form.

I manage to get one lookup to work, using the following code, but th
other 2 dont want to populate no matter what I do , What am I doin
wrong ? or can someone please show me a easier way ...

Course ID | NQF Level | Credit | Cours
Descriptio
Drop Down | Populates :D | Nothing :cry: | Nothing :x

the code I used is as follows

Option Compare Databas

Public Check1 As Strin


Private Sub Course_ID_AfterUpdate(
Me.Course_ID = Course_ID.Column(0
Me.NQF_Level = Course_ID.Column(1
Me.CourseDesc = Course_ID.Column(2
Me.Creditadd = Course_ID.Column(3

If Check1 = "DEL" The
Els
Check1 = "MOD
End I

End Su

Please share your views and Suggestions ..
 

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