Discussion Locked

Microsoft Access

0 helpful
1 reply
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I need to know how if there is a way to use logic on Microsoft Access. If there is how do you do it. I want to be able to create a drop box on a main form, and the drop box should open the other forms when one is selected. Also, if all of the selections in the dropbox apply how to make them appear.

1 reply

by stillatit

When you have a form in access, you can write visual basic code to be triggered by any event on the form. The visual basic code can do virtually anything, including opening other forms and moving the focus.

In your case, create a combobox control, right-click it and select properties. Its Row Source Type should be Value List. The choices you want should be placed in Row Source, with a semi-colon between choices:
choice1;choice2;choice3; and so on
Right-click on the control again, and select the event builder. In the upper-right box, select AfterUpdate, and Access will create a skeleton subroutine which will be executed when the control is changed.

You can query the control's value in the code by looking at the value of me.controlname.value where controlname is the name you assign to the control.

Good luck.

This discussion is closed to new replies.