Hi
My Problem in short:
I have a form which runs in it's "On Open" event the VB code:
Me.OrderBy = "Category & Date"
And the record source query has an input parameter. The error I get is that the user is asked two times for the input parameter. This error goes away if I remove the VB code.
Now My long version
My task:
I have a form which shows some fields from a query. And everytime the form is loaded I want the form to be sorted by two fields (the fields are category and date).
The Problem:
Now the query is sorted accordingly and the form also at first, but every time a user changes the sorting, the new sorting gets saved in the "Order By" field, so the next time someone else opens up the form, it will have the sorting from the previous user.
My solution:
I made an "On Open" event with the following code:
Me.OrderBy = "Category & Date"
Now the Real Problem:
If I do this it usualy works fine. The sorting is like I want it to be every time I open the form.
But now I have a form based on a query, that takes in parameter from the user. The user can here select what dates to look at. The Criteria in the query looks like this:
>=[From date]
And the problem is that the user is asked 2 times when he opens up the form, for the "from date".
Now if I remove the little VB code (Me.OrderBy = "Category & Date"), this error dissapears, and the user is only asked once, like he's supposed to.
So somehow this error is caused by that little code... anybody have any clue why?
My Problem in short:
I have a form which runs in it's "On Open" event the VB code:
Me.OrderBy = "Category & Date"
And the record source query has an input parameter. The error I get is that the user is asked two times for the input parameter. This error goes away if I remove the VB code.
Now My long version

My task:
I have a form which shows some fields from a query. And everytime the form is loaded I want the form to be sorted by two fields (the fields are category and date).
The Problem:
Now the query is sorted accordingly and the form also at first, but every time a user changes the sorting, the new sorting gets saved in the "Order By" field, so the next time someone else opens up the form, it will have the sorting from the previous user.
My solution:
I made an "On Open" event with the following code:
Me.OrderBy = "Category & Date"
Now the Real Problem:
If I do this it usualy works fine. The sorting is like I want it to be every time I open the form.
But now I have a form based on a query, that takes in parameter from the user. The user can here select what dates to look at. The Criteria in the query looks like this:
>=[From date]
And the problem is that the user is asked 2 times when he opens up the form, for the "from date".
Now if I remove the little VB code (Me.OrderBy = "Category & Date"), this error dissapears, and the user is only asked once, like he's supposed to.
So somehow this error is caused by that little code... anybody have any clue why?