form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a form which has fields from a query

Also at the top,in the form is search fields


When I enter the keywords in the search box, It popups a new datasheet view
of the query with the right results

but not the fields in the form itself?

why is that?
 
Have you based the subform on a query to the table? If so, you can then set
up the query where the criteria for each field = whatever is entered into
the corresponding textbox on the form and, if appropriate, AND where the
textbox is null. For example:

[Forms]![FormName]![TextBoxName] Or [Forms]![FormName]![TextBoxName] Is Null

Wrap 'Like "*" & ...... & "*" around the above if you want to search part of
the field.

All you then have to do then is requery the data to refresh it.

You haven't told us how you send the query, so I can't answer why it doesn't
work how you want it to, except to say you haven't done it correctly - you
just need to follow the above format.

M
 
many thanks
it works now.

The problem was with linking the search button with the query.
Instead of saying requery it just said query ....

Many thanks


Someone said:
Have you based the subform on a query to the table? If so, you can then set
up the query where the criteria for each field = whatever is entered into
the corresponding textbox on the form and, if appropriate, AND where the
textbox is null. For example:

[Forms]![FormName]![TextBoxName] Or [Forms]![FormName]![TextBoxName] Is Null

Wrap 'Like "*" & ...... & "*" around the above if you want to search part of
the field.

All you then have to do then is requery the data to refresh it.

You haven't told us how you send the query, so I can't answer why it doesn't
work how you want it to, except to say you haven't done it correctly - you
just need to follow the above format.

M

flow23 said:
I have a form which has fields from a query

Also at the top,in the form is search fields


When I enter the keywords in the search box, It popups a new datasheet
view
of the query with the right results

but not the fields in the form itself?

why is that?
 
That query code helped me with a search button I want to impliment on my
database so users don't have to revisit the switchboard to launch the search.

However:
In the form with the text box that is the input to the query, and the button
that launches the query the only other thing in the test form is a subform
that is supposed to be based on the query (I used the subform wizard and told
it to use the query).
However the query results pop up in another window instead of the subform.

I need to redirect the output of the query to the subform
Someone said:
Have you based the subform on a query to the table? If so, you can then set
up the query where the criteria for each field = whatever is entered into
the corresponding textbox on the form and, if appropriate, AND where the
textbox is null. For example:

[Forms]![FormName]![TextBoxName] Or [Forms]![FormName]![TextBoxName] Is Null

Wrap 'Like "*" & ...... & "*" around the above if you want to search part of
the field.

All you then have to do then is requery the data to refresh it.

You haven't told us how you send the query, so I can't answer why it doesn't
work how you want it to, except to say you haven't done it correctly - you
just need to follow the above format.

M

flow23 said:
I have a form which has fields from a query

Also at the top,in the form is search fields


When I enter the keywords in the search box, It popups a new datasheet
view
of the query with the right results

but not the fields in the form itself?

why is that?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top