Moving/Hiding Multiple Controls with VBA (1 Viewer)

jackh113

New member
Local time
Today, 01:48
Joined
Sep 7, 2015
Messages
9
I am creating a new module for our company database to track project cost vs budget. Our system is set up with multiple cost lines, each containing various cost codes. However, not all lines will be used on a project. Typically only 5-6 lines, but I need to set the form up to use the other lines if applicable.

In order to keep the form uncluttered and to a minimum, I would like to use a form (Cost Analysis Select in the attached DB) that would allow the user to select the applicable lines prior to starting a new Cost Analysis form.

My question is what would be the most efficient way to take the selected lines from the Select form and position them in the main form similar to the current layout, then hide the non-relevant lines and related codes beneath each line. What started out as a great idea seems to by rapidly becoming a long embedded if....then statement.

I'm hoping there is a better way to do this. I'm open to any and all ideas.

Note that in the attached DB, the forms are still in development. I haven't created the underlying tables or queries yet. The majority of the control boxes will ultimately be attached to a record source.
 

Attachments

  • Temp DB.accdb
    1 MB · Views: 45

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 07:48
Joined
Sep 12, 2006
Messages
15,658
without getting involved in detail, you seem to be thinking of this in an excel way, rather than a database way.

it might well be that your table structure is not optimal for what you are trying to do.

for a given project, you probably need to identify the cost elements you need, and just manage those.

Can you show the tables and relationships you have?

I haven't looked at the upload database, but how can you have a database with no tables, as you describe.
 

Users who are viewing this thread

Top Bottom