Conditional display of fields on a form

carvind

Registered User.
Local time
Today, 04:45
Joined
Nov 10, 2000
Messages
22
Is it possible to display a set of fields on a form based on a selection from a combo box located in the same form? If it is possible, how do I do that?

All the fields are on a single table and the display has to change depending on the combo box selection.

Any help would be greatly appreciated.
 
Hi
In the 'lostfocus ' property of the combo box place a macro which will set the 'visible'property of the controls you wish to make visible to 'yes' depending on the selection in the combo box.
varun
 
Hi Varunmathur,

Thanks for your prompt response. If I have say twenty fields that I need to display, should I have to set the visible property to "Yes" for all the twenty fields in the macro. Is there a shortcut to do this?

Thanks once again
 
Look in the archives for using the 'Tag' property to make this process faster for multiple fields. However I use the Current event usually instead of LostFocus so that when I'm scrolling through, the fields update as well.

HTH,
David R
 
Hmmmm. I am reading the question somewhat differently. Are you trying to display the details of a record selected in a combo box? If so then create the combo box using the Wizard and select the 3rd item on the first screen, "Find a record..." then finish the rest of the Wizard. Now if you select a record from the combo box the rest of the fields for that record will be displayed.
 
Hi Jack,

All I need to do is to display a set of fields for data entry based on a selection in a combo box. This combo box will appear at the top of the form.
 
Is the combo box designed to bring up different variants of the form? Go with varunmathar's and my suggestion to 'enable' different fields, but I question the wisdom of using the same form, with presumably different fields, for different purposes.
If your combo box brings up existing records to edit, then Jack's suggestion is what you want.

David R
 

Users who are viewing this thread

Back
Top Bottom