I am tying to build an Employee Phone Directory and I have the form built, but I am having trouble building a query and adding a button to the form so that the staff can just put the LastName and FirstName of the employee and the form will come up with the person's name and extension number. I have tried everything I can think of and I cannot get it to work. I am fairly new to Access and I am still learning queries and macros and getting them to work right. Forms and Tables I have no problem with.
Employee Phone Directory
Collapse
X
-
Tags: None
-
In your query as parameters you can add an expression like:
Forms![MySearchForm]![FirstName]
AND
Forms![MySearchForm]![LastName]
And for Macros you choose openquery command, you save the macro that open your query
In the On Click property of your bouton you assign from the list your macro!
:) -
-
Originally posted by PEBIn your query as parameters you can add an expression like:
Forms![MySearchForm]![FirstName]
AND
Forms![MySearchForm]![LastName]
And for Macros you choose openquery command, you save the macro that open your query
In the On Click property of your bouton you assign from the list your macro!
:)Comment
-
Originally posted by startingover04I tried exactly as you stated above and I keep getting an error of "invalid brackets" It adds a bracket at the beginning of 'Forms'. When I try to an ending bracket just to satify it, then I still get the error. I'm confused.
[Forms]![MySearchForm]![FirstName]
AND
[Forms]![MySearchForm]![LastName]
Where MySearchForm is the name of your form
And FirstName is the name of your Form Field where you enter the first name...
Please verify the names of your Fields in Form!
:)Comment
Comment