Multiple charts based on user's inputs on one form- Microsoft access


I'd like to create charts based on selected listbox items & entered dates from a form.

The first graph works fine, but the second one isn't loading the correct data.

I think the problem is that the second table uses "ID" instead of "WorkerID" and the main form's record source

is based on a specific table.

I've tried to create relationships between tables  tWorker,tReg and tAbsence, but it did not recognize WorkerID in tReg.

Is there a solution to this?

Thank you.
David LelièvreAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dale FyeCommented:
You should be able to use any field name in the lInkMaster and LinkChild properties of the subform (subReport).  and you can actually point one of those values to an unbound control on your main form, if you need to.  So instead of selecting a field on the main form as the Master, select the control that the value is in.

John TsioumprisSoftware & Systems EngineerCommented:
I don't see any charts in the sample you uploaded.
David LelièvreAuthor Commented:
@Dale Fye

Thanks, I'll try something.

@John Tsioumpris

It is in the form "frmReg".
David LelièvreAuthor Commented:

I've added the child/master link on the second charts, but I'm getting the error "The microsoft access database engine does not recognize 'qAbsence!ID' as a valid field or expression.

Why am I getting this error and how can I fix this?

Thank you.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.