Refresh w/out Requery?

  • Thread starter Thread starter Jerry Crosby
  • Start date Start date
J

Jerry Crosby

I have a form based on a query, and that query has two parameter prompts.
(It's prompts for "What day do you want?" and "What time?"....user responds
with something like "Saturday" for the first one and "4:00" for the second.)

When the form opens it lists the query results as a continuous form, sorted
by one of the fields, which is a numerical field.

The purpose of the form is to be able to change the order sequence by
changing the number in the numerical field. So if I wanted to make the one
that is listed as #3 go to the end of the list, I'd change that number to
#31.

Having done that, I now want to refresh the screen to reflect the new order
sequence. However, because it's based on a query with parameter prompts, if
I add a command button to requery, I'm re-prompted for those parameters.

Is there a way to bypass those prompts the second time?

Sorry if this is confusing. I can supply sample data that may make more
sense.

Thanks in advance.

Jerry
 
Having done that, I now want to refresh the screen to reflect the new order
sequence. However, because it's based on a query with parameter prompts, if
I add a command button to requery, I'm re-prompted for those parameters.

me.recordsource=me.recordsource

might help


If you expect an answer to a personal mail, add the word "manfred" to the first 10 lines in the message
MW
 
Andi,

Unfortunately, I don't have the program here at the office to try your
solution, but exactly where would I put the me.recordsource=me.recordsource?
In the code for the button? Seems like it would need some other
coding...requery??

Sorry for my ignorance.

Jerry
 
hi Jerry,

Jerry said:
Having done that, I now want to refresh the screen to reflect the new order
sequence. However, because it's based on a query with parameter prompts, if
I add a command button to requery, I'm re-prompted for those parameters.
Is there a way to bypass those prompts the second time?
No, cause your using them in your query.

But there are two possible bypasses:

1. Craft your query in the on load event of your form and use input
boxes to query your conditionals.

2. Create public functions for each of your conditional in your query
and us them instead of the parameters.

mfG
--> stefan <--
 
Andi,

Unfortunately, I don't have the program here at the office to try your
solution, but exactly where would I put the me.recordsource=me.recordsource?
In the code for the button? Seems like it would need some other
coding...requery??

changing the recordsource is the same as requery, but it in this case
the recordsource has your parameters and don't ask you again

If you expect an answer to a personal mail, add the word "manfred" to the first 10 lines in the message
MW
 
Back
Top