GoAccess,
Welcome to Bytes!
First, please use code tags when you post your code to this forum. I have edited your post so that it complies.
Second, in general, we are not going to download a database from a first-time user, for obvious security reasons.
Third, there appears to be a clear communication/language problem with your question. It is very difficult to decipher exactly what it is that you are asking--or what the specific problem is. However, I will try my best to look at what you've posted and make any comments/recommendations.
Concerning your first problem, it is unclear what the issue is, so I cannot comment.
In Line 4 of your first block of Code, the syntax you are using for a Filter is incorrect. Your Filter should simply be:
- "[UserName] Like '*" & KeyWord & "*'"
In Lines 6 and 7, I am not sure why you are turning your Filter on and then immediately turning it off again. This could be why you are going to the first record and not the desired record(s).
Concerning your second procedure, I am not sure this is needed. You should put your code for
ComSearch
into the
AfterUpdate
procedure for the Text box OR keep it where it is, without a call to it from the
AfterUpdate
procedure. I can only see people wanting to search for something after they have updated the search field, but sometimes they want to click a button to search, rather than search automatically. Either way, it is not "wrong" to have it the way you have described.
As a side note, if you have two
distinct problems/questions, we request you create two separate posts, so that each problem may be addressed individually. -Thanks from the Moderators!
Hope this hepps!