Question : sort subform query data entry

I have a form - frmMain I am using for data entry.  Simple, 1 text box, 1combo to look set an entity type.
Then I have a subform fsub, which shows the same two columns.  I can add data and it redisplays fine.
I want to resort the subform when the user double clicks on the column heading of the subform, so they can review the list.

i've tried a few things (all of the calls are from within fsub):

            Me.Parent.fsub.Form.RecordSource = strSQL
            Me.Parent.fsub.Form.Requery

the SQL is fine, but it brings back no records.

and
   Me.OrderBy = column1

I know this is a simple syntax issue, but I have haven't been able to find a good source reference for that.

thanks

Answer : sort subform query data entry

leesgreenberg,


Again, as far as I know there are no events that trigger when you double click on the column headings.
Can you explain how you are doing this?


In any event...
If all you need is to have your vendors sorted in the subform, then why not just make the source for the form a query that is always sorted by the vendor name?

This way you do not need any code at all?

You can requery the subform on the Mainform's AfterUpdate and AfterDeleteConfirm events, to see the updated data.

Here is a sample:
http://www.ee-stuff.com/Expert/Upload/getFile.php?fid=6986

JeffCoachman
Random Solutions  
 
programming4us programming4us