NeopPa and TwinnyFO. thank you both. I have no training in Access and learn from reading and doing. Thank you for so much for the support. May I ask one last favor, I am such a winnie about this, would you please insert your suggested code in the all the code I provided above to display all together . I don't know where to start With Me and End With. Please.. and thank you
Display single record or duplicate records
Collapse
X
-
-
Originally posted by MCervenkaMCervenka:
May I ask one last favor, I am such a winnie about this, would you please insert your suggested code in the all the code I provided above to display all together.
NB. My changes will hopefully work but I can't test them. Your original code couldn't possibly compile, so trying to compile will always help you find the more obvious problems before you get into worrying about the logic.
The updated code would be :
Code:Option Compare Database [U]Option Explicit[/U] Private Sub txt.Search_AfterUpdate() On Error GoTo EH Dim strFilter As String With Me strFilter = "([ReceiptNumber] Like '*%RS*') OR " _ & "([ANumber] Like '*%RS*') OR " _ & "([SerialNumber] Like '*%RS*')" .Filter = Replace(strFilter, "%RS", .Text259) .FilterOn = True End With Exit Sub EH: MsgBox "There was an error filtering the Form!" _ & vbCrlf & vbCrlf _ & Err.Number & vbCrlf _ & Err.Description & vbCrlf & vbCrlf _ & "Please contact your Database Administrator" _ , vbCritical _ , "WARNING!" Exit Sub End Sub
Comment
-
Hello NeoPa. Have been temporary assigned to another task, but finished and now return to finish with problem. I made above changes and works well but still receive popup Parameter Value box "Enter Parameter Value" "Forms!Inqu iry Record!Text259" . the %RS you provided above, is that a suggest name change to a field name?Comment
-
No. That's a marker in the original text that is replaced by the value found in Me.Text259.
To have an idea why your code is behaving that way I'd need to see exactly what you're using. I can't see any way that would be the result of using the code I suggested. I suspect there's been a slip 'twixt cup & lip.
Show us what you've got and we'll try to understand what's gone wrong.Comment
-
-
-
Originally posted by MCervenkaMCervenka:
can I use the same VBA commands on to different formsComment
-
Neopa so sorry, I reread my posting after I sent it. What I meant to say is, I copied macro from one form "INQUIRY" and used it as another form "UPDATE". Both forms are using the same macro/code. Since the INQUIRY query macro calls for the INQUIRYFORM, is it using the macro/code INQUIRY query and that is why I am receiving the PopUp Message box Parameter Query message which references INQUIRYFORM in my UPDATE form?Comment
-
Now I'm very confused. In post #16 you asked how to implement the code. I posted a suggestion for you. Nothing since then has seemed like a continuation of the conversation. The next step would have been to try that suggestion, however, all of your posts since have been based on what I can only guess is some other idea of a solution. I can't help you with that (I have absolutely no idea what that might even be and it's certainly not something that would fit in this thread).
If you would like to step back to post #17 and proceed logically from there then I'm happy to continue. Otherwise we should neither of us be going off at tangents in a thread that's already - essentially - concluded. Does that all make sense?Comment
-
Neopa.....not meant to confuse, guess I tried to mix two issues together. I tried to introduce issue on how to stop the pop up message for enter parameter value from the query from displaying when the information is already entered on a form. So I was guestimating (guessing/estimating) that when I copied the form INQUIRY and used it as UPDATE form, it carried over the same macro thus calling for the parameter value used on the INQUIRYFORM instead of the UPDATEFORM. Mia culpa. You have been nothing short of amazing in your assistance and responses.Comment
-
NeoPa. what is the best way to receive assistance if it would be better to provide you copy of a form, query or the table which contains records or query information that is being asked about. do not see way to attach anythingComment
-
Mcervenka1,
To add attachments to your post, you would click the “advanced” button instead of post reply.
We will accept forms, tables and queries, but that is typically not the preferred method. Usually, there is a specific problem on a specific form/report/query/table and we will look at that issue specifically and provide assistance in troubleshooting or providing possible solutions. Usually, if the issue requires a download of your project, we will ask for it.
As a reminder, if there is a new issue/question, please post to a new threaded discussion (as mentioned previously).Comment
-
By a very long way, the best method of getting assistance is to take the time to put it clearly into words. This has many benefits. It helps you to understand your own situation more clearly. I know this because I've seen it many times on here. I also know it for myself as I've often ended up not requiring help once I've made the effort to explain it as clearly as I can. It also means that we don't all waste loads of time trying to work out what the question should be all the way through the process of trying to help.
Now, I'm not generally considered an idiot, so I do understand that doing that can be hard. More so for some than others. Not everyone speaks English natively and I have a great respect for those that manage to get by in a foreign language. The very idea that it's been attempted though goes a long way to convincing me to spend quality time assisting in such a thread.
Sometimes pictures can be helpful. This is rare. Normally we can see this is an attempt to avoid making the point more clearly in words. Definitely there are exceptions, but they're quite rare. Sometimes a well explained situation can be further clarified by pictures.
As a general rule we will be put off by anyone loading a copy of their project without first being asked to do so. I sometimes do so with members I've developed a friendly relationship with. I'm generally happy to do so for other experts. I'll even use TeamViewer to connect with some if they need it. I'm never happy to see such levels of support simply expected because some members are too dim even to realise what doing that means.
Two other reasons for avoiding this without being specifically requested are :- The expert may have a version of Access that's not compatible with the member's project.
- Many experts are on networks where such downloads are prohibited. These are often enforced electronically so they couldn't even if they wanted to.
Obviously, as Twinny pointed out, there are ways of attaching files. You will see this if you select the Advanced option. Such attachments should be very carefully considered before use though, as explained above.Last edited by NeoPa; May 17 '18, 10:34 PM.Comment
Comment