Ken Sheridan!!!!! Please help me!!!!

D

duchessofireland

I've got my form set up to show the different jobs done or to do. The
subform I have set up is a combo box to select employees. I'm having a
problem with it though. I can choose my employees to assign to a job and
then when I go to enter a new record - the employees that I assigned to the
previous job are already showing in the new empty record. If I change the
employees for the new record, they change in the other records as well. I
want to assign different people for every job. But the way I have it set up,
it changes it in every record. Not sure where I screwed up. Hope this makes
sense.
 
J

John W. Vinson

I've got my form set up to show the different jobs done or to do. The
subform I have set up is a combo box to select employees. I'm having a
problem with it though. I can choose my employees to assign to a job and
then when I go to enter a new record - the employees that I assigned to the
previous job are already showing in the new empty record. If I change the
employees for the new record, they change in the other records as well. I
want to assign different people for every job. But the way I have it set up,
it changes it in every record. Not sure where I screwed up. Hope this makes
sense.

aha... you must have a blank Control Source for the employee combo box. It
should be the EmployeeID in the Assignments table.

John W. Vinson [MVP]
 
T

Tom Wickerath

Sounds to me like you might be missing one or both:
Link Master Field / Link Child Field

This is a property on the Data tab for the subform container (the object in
form design view that holds the subform). The Link Master Field should point
to a uniquely indexed field in the recordset for the main form (ie., the
primary key). The Link Child Field is the associated foreign key field.


Tom Wickerath
Microsoft Access MVP
https://mvp.support.microsoft.com/profile/Tom
http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________
 
K

Ken Sheridan

OK, my Hibernian compatriot, let's reiterate a little from the original
thread, in which incidentally I did reply to your last post, but on checking
the thread now I see it somehow doesn't seem to have been posted to the
thread:

1. The parent form is based on the jobs table.
2. The subform is based on the assignments table.
3. The LinkMasterFields and LinkChildFields of the subform control (that's
the control on the parent form which houses the subform) are respectively the
primary key of the jobs table and the foreign key in the assignments table
which references the primary key of the jobs table; probably both called
JobID or similar.

From your description of the problem I tend to agree with Tom that it’s most
probably the last of the above which is missing. If so the subform will be
showing all the employees from the assignments table, regardless of which
job(s) they area assigned to.

Ken Sheridan
Stafford, England
 
D

duchessofireland

YOU ARE MY HERO!!!! I don't know how everything got so buggered up...but
seems to be working now. Just went back through step by step making sure
that everything read the way it was supposed to....I believe it's working
now. Ready for another question?

Now that I can enter my information into the form and subform. I'd like to
create a query so I can draw up a report that shows all the job orders and
I'd like to show all the employees that worked on each job. How do I create
a query to pull information from the form and the subform info???? I tried
it and it said I was trying to pull from tables that aren't related? Sorry I
need so much help. Very new to this. But THANK YOU SOOOOOOOOOOO much!!!!
 
D

duchessofireland

KEN!!! You are my HERO!!!! Thank you so much! I went back through
everything from the beginning and made sure it was set up the way that you
had said. It works!!!! Now - I've got one more question! ha ha ha! I hope
it's the last question. Now that my form and subform are working correctly.
I'd like to do my data entry through the form. Next, I want to query the
information I've put into the form and subform. for example: I want to
print out a report that will show the closed work orders and which employees
I assigned to that particular order. I tried to do a query earlier, but it
said I couldn't do it because I was pulling information from unrelated
tables. Is that right? Or should they be related? I can query the jobid
number and the employeeid number from the assignments table...but, that
doesn't give me enough information...only numbers. Thanks for all your
help!!!
 

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