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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form.SortOrder doesn't work

Status
Not open for further replies.

ruthcali

Programmer
Apr 27, 2000
470
US
I am using Access 97.

On my form, i made a button called 'sort by project#'.

But i can't get the code to sort the form.

i tried:
Form.SortOrderOn=true
Form.SortOrder= [project_no]
Form.requery

But it tells me "the microsoft jet database engine does not recognize '46596' as a valid field name or expression."

46596 is the first value in the field [project_no].

What am i doing wrong?

I know i could create a new recordsource when the user clicks the button:
Form.Recordsource= "Select * from TblTest sort by project_no", but i was wondering why the Form.SortOrder above doesn't work.

Thanks,
Ruth
 
Not sure how to put a different thread number in here yet so heres the link

thread702-449519
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top