LarryDavidow
Technical User
I have me a predicament!!
I have a search form working very niceley that queries one of my tables and returns results based on 5 fields in a subform.
Here's my problem... The subform data is based on the query "Search". In the "OnClick" procedure of the search button, some basic SQL is run to add criteria to this Query based on values in the text boxes.
If more than one user searches at the same time, they either get an error (file deleted), or they get the results of the concurrent user's search (Depending on how the searches are sequenced).
My grand idea was to create multiple queries with the user names appended to the end (SearchUser), and in my SQL string, specify the query to be used as Search" & CurrentUser. This works great, however, how in the hell am I going to get my subform to pull records from the correct query based on the specific user who is logged in and doing the search???? Is there any way to dynamically set the subform's data source to Search & CurrentUser()???? Or, can this be done programatically???
Lots of questions....
I have a search form working very niceley that queries one of my tables and returns results based on 5 fields in a subform.
Here's my problem... The subform data is based on the query "Search". In the "OnClick" procedure of the search button, some basic SQL is run to add criteria to this Query based on values in the text boxes.
If more than one user searches at the same time, they either get an error (file deleted), or they get the results of the concurrent user's search (Depending on how the searches are sequenced).
My grand idea was to create multiple queries with the user names appended to the end (SearchUser), and in my SQL string, specify the query to be used as Search" & CurrentUser. This works great, however, how in the hell am I going to get my subform to pull records from the correct query based on the specific user who is logged in and doing the search???? Is there any way to dynamically set the subform's data source to Search & CurrentUser()???? Or, can this be done programatically???
Lots of questions....