Data Entry Fields that are dependent of Combo Box selection

Two places:

Private Sub Form_Current()

and

Private Sub Combo174_AfterUpdate()

Combo174 is the combo-box that has the department
 
The current event should fire when you change records. Can you post the db?
 
The code is working correctly, just not doing what you want. You only account for the majority of fields in the Collections condition. The others only set 4 fields, which are always the same. I added this under posting

Me.Adjustment_Transactions_Input.Visible = True
Me.Adjustment_Transactions_Output.Visible = True

and those fields appear and disappear as I scroll records. You need to account for all fields in all conditions (setting visible to either true or false). This is probably a good time for me to repeat my statement that normalized table design is fundamental to database development. All of those fields should probably be records in a related table, not fields in this one. If I fill out 6 of the data fields, I have 6 records in the related table.

http://www.r937.com/Relational.html
 
Thanks, that helps...this was only the start of what I was doing, just had to get the form down before all the other language was input. Will check out your

So now I have all the language, and it appears to be working correctly. I didn't know if there was a way to compress only the visible fields.

Example:

Current View:
Additional Charges Input


Refunds Input


Reversals Input


Ideal View:
Additional Charges Input
Refunds Input
Reversals Input

Is there a way to compress them so when the right selection is made, the appropriate fields will show up all next to each other?
 
I think you're trying to work around a design mistake.

If fields are only used for one category, you could stack them on top of one another. Moving them in code would be tricky. Resetting the control sources might work, but I'm not sure it can be done on the fly. I'd really reconsider the table design with normalization in mind.
 

Users who are viewing this thread

Back
Top Bottom