commands forms

Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

Forum home » Delegate support and help forum » Microsoft Access Training and help » Commands on forms

Commands on forms

resolvedResolved · Medium Priority · Version 2003

Rachel has attended:
Access Introduction course
Access Intermediate course
Access Advanced course

Commands on forms

Hi
I am trying to add a command onto a form in which I can search for a specific entry in another form. I've found the find entry command but I dont know what to do once I have put that onto the form. Unlike the new entry command, which asks you which form to open, the find entry doesnt do that and I dont know how to write a command for that.
Thank you

RE: Commands on forms

Dear Rachael

Thank you for attending Access Courses!! I hope you enjoyed the course and benefited from it.

I believe that you have covered Access Advanced with us and you must have covered Macros!!

In order to achieve the desired result you have to follow these steps:

Create a new Macro and set the first action to OpenForm and in the Action Argument choose the Form that you wish to search in.

The next action to use is GoTo Control and again in the action argument type in the name of the filed that you wish to search in. (Please make sure when you type in the name of the filed it is in Square brackets)

Last Action to set is RunCommand and in the Action Argument select the Find from the drop down list

Once the Macro has been created Save the Macro with an appropriate name.

Go to the Form where you need to create a command button.

Create the command button in the form. If the wizard appears cancel the Wizard.

Right-click on the command button and choose Properties.

Choose the Event Tab and on the On Click box choose the Macro that you created.

Go to the Form view and then press the Command button and you will observe that the chosen form will open and the Find dialog box will be displayed automatically for you to find your specific data.

I hope this has answered your query.

If this has answered your query then I would request you to please mark the question as resolved!! If not and you have a specific question related to this then please post it as a new question and we should be able to provide you the solution for it!!

Kindest Regards


Rajeev Rawat
MOS Master Instructor 2000 and 2003
MCAS Master Instructor 2007

Tue 20 Jan 2009: Automatically marked as resolved.


 

Access tip:

Create a custom Close button on a Form

By default, Forms that you create in Access have a full set of control buttons, that is, a title bar with Minimize, Maximize and Close buttons in the top right-hand corner and a Control Menu in the top left-hand corner.



Sometimes Access needs to follow certain procedures or events as users close a Form (such as automatically opening another Form perhaps). So it is often a good habit to create a custom Close button on a Form for everyone to use, rather than the standard closing cross.



To create a custom Close button:

1) In Form Design View, draw a Command Button onto the Form.

2) Use the Command Button Wizard to select Form Operations under Categories, and Close Form under Actions.

3) Choose Finish.



Access then creates the button and code to close the form for you. You can add any extra code that needs to run as the Form closes to the same Close procedure.



However, the creation of a custom Close button is pointless if the closing X in the top right-hand corner of the Form remains active. To make the closing X inactive, open the Form Properties box then on the Format tab set the Close Button setting to No. This will grey out the closing X leaving it visible, but inactive.



View all Access hints and tips


Server loaded in 0.08 secs.