Criteria to open form...

Gary W. Graley

Registered User.
Local time
Today, 06:40
Joined
Feb 27, 2004
Messages
43
Ok, I use a query with criteria to open a form up to view what records that fit.

I use the same question in two fields, with wild cards around it so it will pull
up records even if the criteria is imbedded in the middle of the fields.

BUT, my trouble comes if someone viewing the resulting records does a sort
on one of the other fields and closes the form, it keeps what the sorting view
was and now when you go to open the form, it asks the question TWICE
instead of just the once, as it usually does.

Using Access 2003

I am not fluent with writing code, so I rely on using macros for most everything
So I want to know is there a macro that I could use when the form closes
that it clears out any sorting that was applied?

Thanks in advance,
G2
 
Sounds like your database is not split. m I correct?
 
That's correct, it is not split...
G2
 
Here's what the Criteria in the query looks like

criteria.jpg


and if someone does a sort, looks like they do a descending order on LYR,
Last Year's qty, it adds this in the properties of the form;

orderby.jpg


THEN when you go to open that form up, you get a second question for criteria
but I just noticed that if you ignore it and just hit enter, the query is based
on your first answer, so it's more a nuisance right now, plus it looks kinda ugly...:)

secondquestion.jpg


Hope that helps to show what's happening, appreciate input on how to
clean out the Order By field when closing the form.

Thanks,
G2
 

Users who are viewing this thread

Back
Top Bottom