ck.letterbox
Registered User.
- Local time
- Tomorrow, 08:53
- Joined
- Jun 26, 2008
- Messages
- 19
Hi Guys,
I'm another newby to MS Access.
Here is my story:
I have Form1 with sort button.
After clicking sort button, Form1 will send its RecordSource to Form2.
Form2 provides sorting criteria and returns the SQL statement.
Code below is in sort button in Form1:
Private Sub btnSort_Click()
Dim strSQL_SortSequence As String
'this gfnSort will call to Form2 and return SQL string
strSQL_SortSequence = gfnSort(Me!sbfData.Form.RecordSource)
Me!sbfData.Form.RecordSource = strSQL_SortSequence
End Sub
The gfnSort works fine. It returns SQL string I expect.
The problem is the RecordSource will change to the returned SQL string.
This means the second time I click sort button, program will not work correctly since RecordSource was changed.
Do you guys have any idea?
Any suggestion'd help me a lot and thank you for any reply.
I'm another newby to MS Access.
Here is my story:
I have Form1 with sort button.
After clicking sort button, Form1 will send its RecordSource to Form2.
Form2 provides sorting criteria and returns the SQL statement.
Code below is in sort button in Form1:
Private Sub btnSort_Click()
Dim strSQL_SortSequence As String
'this gfnSort will call to Form2 and return SQL string
strSQL_SortSequence = gfnSort(Me!sbfData.Form.RecordSource)
Me!sbfData.Form.RecordSource = strSQL_SortSequence
End Sub
The gfnSort works fine. It returns SQL string I expect.
The problem is the RecordSource will change to the returned SQL string.
This means the second time I click sort button, program will not work correctly since RecordSource was changed.
Do you guys have any idea?
Any suggestion'd help me a lot and thank you for any reply.