Link to home
Start Free TrialLog in
Avatar of ouestque
ouestqueFlag for United States of America

asked on

What is a requery?

My boss told me I may need to use a requery when creating an interface for my Access database.
What is a requery?
What does it do?
What is it used for?
Why would someone want to use one?
What are its most common uses?
What are some common errors people make when using them?
What are some good tricks when using them?

Whoever gives me the the most relevant/detailed/useful answer(s) gets the points.
Let the games begin!!!
SOLUTION
Avatar of Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
The above experts are correct.

All I can add here without duplicating the above would be comments that spiral downward into mindless frivoloty.  With that in mind, please accept a comment(s) as an answer, and move on.
We are a bit short on mindless frivolity of late, Jim..........
Yeah, I know.  Maybe I should see what I can do to get Nico invited back.  At least that would liven things up around here.
Ok - I give in - we'll do without the mindless frivolity......I don't think we could manage Mr Lighthearted again!
RE Nico ... see his comments here:

http://www.rustyrazorblade.com/index.php/2007/07/30/experts-exchange-should-be-removed-from-google-search-results/

He actually contacted me via email in my profile ... last week ... "switch to The Scripts" was the drift.

mx
Last I remember he's up to about 10 similar rants in diffeent newsgroups, and they all stick to pretty much the same argument that got him tossed, plus 'thescripts is better, and treat people nicer'.

Notice that in many of them there are zero responses.  Also, in all these 'EE treats experts badly' rants he does not admit to being a Moderator here, and having one of the worst track records of Moderators-treating-experts badly.   The proper analogy would be the prison guard that abuses inmates whining about inmate abuse.
jHo ... that's why I posted that ... and though I did respond to his personal email, I pretty much said that 'life is good here for me on EE and that I don't really have any issues' ... and ... that I really don't particularly care for the Scripts UI either, lol.

mx
He's contacted a bunch of people.  Also, last I saw he's a moderator at thescripts.com.
>> "We are a bit short on mindless frivolity of late,..."

Shhhhhhhh!
Some of us are trying to sleep.


Any break from the monotony would be welcome, I agree Pete.
Whatever the cause.

And now - to prove how dynamic and exciting I am...
Requery... <all groan>
As mentioned - requeries of Forms occur to display appended or deleted rows.

>>> What are some common errors people make when using them?
Overuse and unnecessary use.
A requery of a form requires the the current record be committed, and a read of the database be executed again.
In multi-user scenarios - this can be a drain on resources that isn't always required.
A Refresh will update existing data (though without the appended or deleted included).

Another error - requerying and expecting to be able to undo still.  The commit performed by a Requery is powerful - and none of the undo methods will be effective upon it.

>>>  What are some good tricks when using them
Not having to very often? :-p
Actually re-assigning the recordsource when a requery alone doesn't cut it.


I have to say - I'm fascinated by this notion of the boss' comment.
I'm picturing a line of folks sat at PC's.
A boss strolling casually past behind them.
"You there - you can use command buttons on your forms".
Walks on a little further...
"Hey!  You may need to use a requery when creating an interface for that Access database"
Walks further...
"Tut tut... No listboxes *anywhere*???"

It's just such a strangely sweeping statement.
(To the extent that is almost sounds like the Boss doesn't really know the implications himself).
i.e. *why* might you need to requery the data? :-S
Sounds like to me ... the boss has become Corrupted and needs to be DECOMPILED !!! ... and maybe just left in that state!

mx
>  I'm fascinated by this notion of the boss' comment.
I am too.  She also made this unusual request:
https://www.experts-exchange.com/questions/22751895/Access-VB-spacing-code-Easy.html
Clearly, this boss is modulating in a frequency time complex - easily predicted by Schrödinger's Equation - which undulates between this ... and parallel universe time continuum!

mx
Drat.  I gave somebody the impression that I am opposed to mindless frivoloty, or conversational threads.  That was not my intent.

<awkward pause>

Hey ouestque, how we doing on your question?  Got 'er down?
Avatar of ouestque

ASKER

Yes thanks for the feedback guys. I am reading through and deciding on points.