Problems with sorting records on a form

hammerva

Registered User.
Local time
Today, 00:44
Joined
Dec 19, 2000
Messages
102
Hello again. :)

I am trying to sort records from a form in ascending order by Status Number (which is a non key field on the table). But it keeps sorting by the autonumber Meeting Number key field. I set the "Order By" on form to Status Number.

What is going on here.
 
Either right click on the field order asc, click save a few times, or use a query and base the form on a query
 
Okay I changed the recordsource to a query. But when I tried to update a field on a particular record. I get the following error:

The setting you entered isn't valid for this property.

What I usually do is add a command saying "
If Me.Dirty then Me.Dirty = False" so that the process activates the BeforeUpdate events. But it looks like the error is occurring after the BeforeUpdate event is passed. Do I need to set something up in the query builder to allow updates?

I included the code. :confused:
 

Attachments

I tried opening the query and updating record and it allowed me to do it. So obviously it is something in the form layout. I replaced the me.Dirty phrase with

"DoCmd.RunCommand acCmdSaveRecord". I put a breakpoint in the Update click. Right after I execute the RunCommand I get the following error:

The command or action 'Save Record' isn't available now.

* You may be in a read-only database or an unconverted database
* The type of object the action applies to isn't currently selected


Not sure how the recordsource is read-only right now or not currently selected? Do I need to go to the current record before the RunCommand process? I have my allow edits property set to 'Yes".

By the way, I am doing this in Access 97 if it helps in the explanation.

Thanks for all the help Pat even though it doesn't seem like I am understanding it well. :(
 
Last edited:

Users who are viewing this thread

Back
Top Bottom