I am using the openargs to open a form in the On Load event,but, I can't get the form to sort on the "Flavor" field/control.
If OpenArgs = "One" Then
SQL = "SELECT * FROM" & _
" ECF_FlavorsT WHERE Venno = " & Forms!flavbyvenf!.ID ''<<<<................the calling form
Me.RecordSource = (SQL)
Else
SQL = "SELECT * FROM" & _
" ECF_FlavorsT"
Me.RecordSource = (SQL)
End If
DoCmd.OpenForm strDocname
I have tried every way I know to add the "Order By" to the constructed SQL and tried the "me.Order By" property of the form in the Current Event. Any ideas how I can get the form to sort on "Flavor"?