Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

query about parameter query problem!

Status
Not open for further replies.

abbazabba

Technical User
Aug 1, 2003
31
0
0
GB
I have made a form that I have been using succesfully for a while now. There is a command button that launches a parameter query. The query asks you to enter a student name, and this brings up all results matching this name.

Whilst looking at one of these query results, I decided it would be better to view it in date ascending order so I changed it.

Since then when I type a name in to the query box and press enter, instead of running the query it brings up the same query box. On typing the name in again, it works.

The only thing I've changed is the order so I presume this must have affected it. Does anyone know the problem? (if this is unclear then let me know!)

Your help would be much appreciated!

Cheers

Phil.
 
Hi abbazabba,

I think this should work. Remove ascending from the Sort field on your query so that the query is not sorted on any field. Then go to the query properties and enter the name of the date field in the Order By property. The date field should be in ascending order when you open it.

Hope it works

Cashe
 
I have opened the query properties for the parameter query and entered 'DATE' in the order by (DATE being the name of the field).

Removing the sort ascending from the field solved the initial problem, but it doesn't appear in date order still..

Probably done something wrong!

Thanks alot for your help..

Philip.
 
First off, you shouldn't have a field named 'DATE'! 'Date' is a keyword in almost EVERY program. Alway use recd_date, open_date, etc.

Second, why don't you post the SQL from the query, that would make it easier to decipher why you are getting the parameter prompt twice.

Leslie
 
Hi there!

Sorry for not replying for a while been tied up, but I think it's sorted now.

Thankyou lespaul for the tip about having a field named date. A schoolboy error and no mistake!

Appreciate everyones continual help on this forum, as my questions continue also!

Cheers

Phil.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top