Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dynamic - On the fly - Form formatting

Status
Not open for further replies.

ahmun

IS-IT--Management
Jan 7, 2002
432
US
I have a data entry form I'm building, and it consists of two parts:

Main Form - Employee Information - linked to tblEmployee
Sub Form - Employee Training Info - linked to tblTraining

A supervisor can either enter info for a new employee, and then continue to add training info, or select an existing employee and enter additional training info.

They want this form to have EVERYTHING on it... but that would be too cluttered.

I was thinking of splitting this form into two halves. the top half for employee info entry, and the bottom half for training info entry. I want to make the option available for users to click a button and hide some of the info in the Employee entry part(kind of like a hide/expand option that Windows loves to do in some of their dialog boxes with the "details" button), thus hiding info not relevant to entering traiing info. This would then make more room on the form for data entry of training info.

Does access have an efficient way to handle this? or should I just create 2 forms?

bottom line is that my employer wants it all... entry for employee info and training info... on one form. And looking at the screen sizes of some of the potential users, that will be quite cluttered!
 
Why not use a Tab control panel. Set it so it's the full width of a maximised screen but about an inch shorter, thereby leaving some space at the top of the form for the employees core info like name, date of birth, department, employee number.

Use the default (first) page of the tabbed panel for the rest of the employees details like address, phone numbers, next of kin, whatever. Then place a subform displaying the training info on the second tabbed page. This could be a Continuous form showing multiple related records horizontally or a one record per view, columnar form.

No one is going to need to see where an employee lives and what courses he's been on all at the same time - surely.

Good Luck.

Rod
 
Thanks, Rod... about the tab control idea,

however, I want to make this as idiot proof as possible... as some of the users might not even have know-how of how to use tab controls... I wanted to make the whole screen.. all inputs, both for employee detailed info, and his/her training record.

This ability to hide/show is more of a bonus for those who are more knowlegable of how to use computers.

Currently, I put a little hide/show employee details button, that literally makes all unnecessary fields invisible, and resizes the subform to fill the void. It was a pain to code this way... but I am wondering if there is a better form control (tab control that expands/contracts) or idea that can do what I'm looking for more efficiently.

Earnie Eng
Newbie Access Programmer/DBA
(I just got a job! yay!)
Code:
---------------------------------
If you are born once, you will die twice.
If you are born twice, [i
 
How about designing two versions of the same form, one with all fields and the other with the reduced fields collection. Have the minor form open in the normal way but insert code in it's OnOpen Event to open the major form with it's WindowMode set to acHidden.

Have a button on each form which opens (unhides) the other form while closing (Hiding) its own form. You will need to ensure that both forms are synchronised to the same record at all times but this could be achieved by placing code in the Current Event of each form to move the other form to the same record.

Just an idea, though I still prefer the tab idea.

ps. If they can click a button, why can't they click a tab, after all its just a button attached to a panel. If you were to use a tab method you could place code in the OnExit event of the last field of the first tab to automatically select the first field of the second tab, and vica versa. You could allow the user to switch this feature on/off using a toggle button marked Hide/Unhide or whatever. It means above all that you don't have to mess around resizing the form, which seems like hard work to me.

Best regards

Rod
pps. born twice Feb 1951 and March 1981
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top