Filling a form based on (a) template(s)

JonathanMurray
NewLounger
Posts: 3
Joined: 16 Feb 2010, 19:31

Filling a form based on (a) template(s)

Post by JonathanMurray »

I have an access 2003 database with tables for personnel and items, and a child table for items issued to the personnel. I would like to provide an option for "default templates" for the user to chose from to pre-fill which items are issued based on a selection.

I.E. When adding a new person to the database, if their job is x, they need items a,b,c. If their job is y, items b,d,e are needed.

Hopefully I've explained this well enough... I occasionally have problems getting what's in my head out into words. (Right, Nan?) :grin:

Any suggestions?

Thanks!

User avatar
HansV
Administrator
Posts: 78236
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Filling a form based on (a) template(s)

Post by HansV »

Welcome to Eileen's Lounge!

Would the items issued to a person be determined by the job, i.e. if a person holds job y, then items b, d, and e will always be issued, and no others?
Or is it more like a starting point, i.e. the items actually issued could be partly or entirely different?
Best wishes,
Hans

JonathanMurray
NewLounger
Posts: 3
Joined: 16 Feb 2010, 19:31

Re: Filling a form based on (a) template(s)

Post by JonathanMurray »

Thanks for the welcome, Hans,

Definitely as a starting point: Some items will necessarily have to change based on size (clothing type items). Object is to let the person doing the issuing know what items are "standard issue", but not tie their hands if more or less is needed.

User avatar
HansV
Administrator
Posts: 78236
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Filling a form based on (a) template(s)

Post by HansV »

You could create a set of tables like this:
x24.png
You'd need VBA code to add the ItemIDs belonging to the selected JobID from tblJobTemplates to tblIssued. After that, the user can add, remove or change items as needed.
You do not have the required permissions to view the files attached to this post.
Best wishes,
Hans

JonathanMurray
NewLounger
Posts: 3
Joined: 16 Feb 2010, 19:31

Re: Filling a form based on (a) template(s)

Post by JonathanMurray »

Elegant solution, assuming I can wrangle the code to bring the template data to the new record. :D

Thank you, Hans!

User avatar
HansV
Administrator
Posts: 78236
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Filling a form based on (a) template(s)

Post by HansV »

Good luck, and don't hesitate to ask for help if needed!
Best wishes,
Hans