Tezcatlipoca
Registered User.
- Local time
- Today, 02:50
- Joined
- Mar 13, 2003
- Messages
- 246
The Layout:
1 x Table (coredata) which holds the details
1 x Form (Keyword) which contains the text box users fill out to make the search. The text box is unbound, and has the name 'Keyword'. The 'Search' button has the following code:
Private Sub Command5_Click()
On Error GoTo Err_Command5_Click
DoCmd.OpenForm "coredata3"
Exit_Command5_Click:
Exit Sub
Err_Command5_Click:
MsgBox Err.Description
Resume Exit_Command5_Click
End Sub
1 x Query (coredata Query1) which has all of the various table fields checked to display in the final form, and has the following code in the Criterea section of the 'Student' field:
Like [Forms]![frmKeyword]![keyword]
1 x Form (coredata3) which will display the filtered data based on the box from the 'Keywrod' form. This form has the following entered into it's Record Source field:
SELECT [coredata].[Name], [coredata].[Address], [coredata].[Phone], [coredata].[Student], [coredata].[Course Start], [coredata].[Course End], [coredata].[Agent], [coredata].[Country], [coredata].[Lessons], [coredata].[Course Type], [coredata].[Details], [coredata].[Last Visit Date] FROM coredata WHERE ((([coredata].[Student]) XXX [Forms]![frmKeyword]![Keyword]));
The Desired Effect
The user - via a button on my switchboard - opens up the form frmKeyword, enters the name - or fragment of a name - of a student into the text box, then clicks 'Search'. Any record where the Student field contains the exact name, or part of the name, entered by the user is filtered and displayed through the form 'Coredata3'.
The Current Effect
At the moment, I can enter data in the text box, but everytme I click 'Search', a window for the results form appears, but is completely greyed out. Not only that, but the whole of Access appears to freeze and locks up, from which I can only exit by using Ctrl + Alt + Dlt and ending the Access task.
Where am I going wrong?
1 x Table (coredata) which holds the details
1 x Form (Keyword) which contains the text box users fill out to make the search. The text box is unbound, and has the name 'Keyword'. The 'Search' button has the following code:
Private Sub Command5_Click()
On Error GoTo Err_Command5_Click
DoCmd.OpenForm "coredata3"
Exit_Command5_Click:
Exit Sub
Err_Command5_Click:
MsgBox Err.Description
Resume Exit_Command5_Click
End Sub
1 x Query (coredata Query1) which has all of the various table fields checked to display in the final form, and has the following code in the Criterea section of the 'Student' field:
Like [Forms]![frmKeyword]![keyword]
1 x Form (coredata3) which will display the filtered data based on the box from the 'Keywrod' form. This form has the following entered into it's Record Source field:
SELECT [coredata].[Name], [coredata].[Address], [coredata].[Phone], [coredata].[Student], [coredata].[Course Start], [coredata].[Course End], [coredata].[Agent], [coredata].[Country], [coredata].[Lessons], [coredata].[Course Type], [coredata].[Details], [coredata].[Last Visit Date] FROM coredata WHERE ((([coredata].[Student]) XXX [Forms]![frmKeyword]![Keyword]));
The Desired Effect
The user - via a button on my switchboard - opens up the form frmKeyword, enters the name - or fragment of a name - of a student into the text box, then clicks 'Search'. Any record where the Student field contains the exact name, or part of the name, entered by the user is filtered and displayed through the form 'Coredata3'.
The Current Effect
At the moment, I can enter data in the text box, but everytme I click 'Search', a window for the results form appears, but is completely greyed out. Not only that, but the whole of Access appears to freeze and locks up, from which I can only exit by using Ctrl + Alt + Dlt and ending the Access task.
Where am I going wrong?