hi, is that possible to direct searched query into a form (for viewing pleasure)? in ms access ?
and if possible, can anybody teach me how to do a simple query inside macro? not using the ms access query design wizard method
Printable View
hi, is that possible to direct searched query into a form (for viewing pleasure)? in ms access ?
and if possible, can anybody teach me how to do a simple query inside macro? not using the ms access query design wizard method
First question - set the forms Record Source property to the query, then the controls on the form Control property to the field you want displayed. Both these properties are on the data tab of the properties box. Or use the form design wizard to do this for you.
Second question - I don't like macros. Can make it hard to follow code flow. But if you insist, in the Action column of the macro, select OpenQuery, then in the bottom pane select the query you want. In code, you can use DoCmd.RunMacro "macroname" to run the macro. Of course, in code you can also use DoCmd.OpenQuery "queryname" to run the query. There's a similar command to OpenQuery called RunSQL, but that doesn't work for SELECT queries.
thanks, salvelinus
this problem is solved