How to execute vba to format a form when a cbo box is click

  • Thread starter luis_a_roman via AccessMonster.com
  • Start date
L

luis_a_roman via AccessMonster.com

I have a form that contains a combo box to select different records. The
problem that I"m having is that I would like to trigger a load event to
populate the detail line of the form. Is that possible?

I'm asking how to trigger the load event or something because the form has
unbound controls that depending on their value a specific label Yes X or No
X is showned in the form but when the user use the combo box I'm not able to
execute the load code that needs to be showned to display the form with the
correct parameters.

Don't want to set up values in the database to store this informaton.

Any suggestions will be appreciated.

Luis
 
M

Marshall Barton

luis_a_roman via AccessMonster.com said:
I have a form that contains a combo box to select different records. The
problem that I"m having is that I would like to trigger a load event to
populate the detail line of the form. Is that possible?

I'm asking how to trigger the load event or something because the form has
unbound controls that depending on their value a specific label Yes X or No
X is showned in the form but when the user use the combo box I'm not able to
execute the load code that needs to be showned to display the form with the
correct parameters.


Just call your load procedure from the combo box's
AfterUpdate event.
 
L

Larry Linson

What do you mean by "trigger a load event to populate the detail line of the
form"?

Form Load is an Event, but does not automatically do what you describe.

If you want to populate the form with information based on a selection in a
Combo Box, you can use a multicolumn ComboBox, and in the AfterUpdate event
of the ComboBox, retrieve the additional data from the ComboBox selection,
using the Column properties -- Column(0) would be the left-most, Column(1)
the next one, etc..

Larry Linson
Microsoft Office Access MVP
 
L

luis_a_roman via AccessMonster.com

Thank you for the guidance.

Luis

Marshall said:
I have a form that contains a combo box to select different records. The
problem that I"m having is that I would like to trigger a load event to
[quoted text clipped - 5 lines]
execute the load code that needs to be showned to display the form with the
correct parameters.

Just call your load procedure from the combo box's
AfterUpdate event.
 
L

luis_a_roman via AccessMonster.com

Thank you for the additional information.

Luis

Larry said:
What do you mean by "trigger a load event to populate the detail line of the
form"?

Form Load is an Event, but does not automatically do what you describe.

If you want to populate the form with information based on a selection in a
Combo Box, you can use a multicolumn ComboBox, and in the AfterUpdate event
of the ComboBox, retrieve the additional data from the ComboBox selection,
using the Column properties -- Column(0) would be the left-most, Column(1)
the next one, etc..

Larry Linson
Microsoft Office Access MVP
I have a form that contains a combo box to select different records. The
problem that I"m having is that I would like to trigger a load event to
[quoted text clipped - 14 lines]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top