var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Condition Macro
Hi, I need help with Access. Could you please help me with creation Search Form. I’m trying to create search Form, I want when the I enter the number in the field then click on search, other form open with the result which read from query. I think there should be link between the search form and result form, which read from query (condition macro). I need explanation with creation these form and what should be the link and who to create condition macro for this issue.
Re: Condition Macro
This should work for you.
Create a query containing all of the data that you want to search.
under the event properties of your click button (search) assign a macro.
(good tip, call your macro something like "searchqueryfromform".
give it a name that discribes what it does.
then create a form to view your query. call it "Viewsearchedrecordform" or somthing.
(i learnt from experience with a db that has about 50 forms and 100 macros)
set your macro to carry out the following actions
OPENQUERY (under the where condition in the query or on the macro line enter forms!<name of form>!<nameoffieldor text box containing value!
OPENFORM(open the form based on the query)
you might want to add another line to the macro to set it to close the search form.
hope this helps
There could be an easier way of dealing with a search screen
create a form in design mode
Place a text box on the form - name it SEARCH (or what ever you want to name it)
Save the form using correct naming routines something like frm_SEARCH_ORDERNUMBER
Create a query with ALL the fields you will want to see when you find your information.
In the crieria section below the field that you want to find enter
Like [Forms]![frm_ Search_Ordernumber]![search]
This will look for a number you entered on the seach form
save the query with a name that means something relevant to what you want the query doing ie qry_Search_Ordernumber
Create another form using the wizard which is set against the new query name that form something like frm_ordernumber_screen
return to the 1st from (frm_SEARCH_ORDERNUMBER) and place a command button on it via the wizard and set it to open the last form you made (frm_ordernumber_screen)
When you now enter a number in the ist form and click the command button it should open the frm_ordernumber_screen with the details you want to see
hope this helps
Thanks Gareth and Plate, it works.