Page 1 of 2.
Results 1...20 of 34
Code: SELECT qryPtdetailsRCAforlistbox.PatientDetailsID, qryPtdetailsRCAforlistbox.PatientDetailsSurname, qryPtdetailsRCAforlistbox.PatientDetailsFirstName, qryPtdetailsRCAforlistbox.RCAID FROM qryPtdetailsRCAforlistbox WHERE (((qryPtdetailsRCAforlistbox.PatientDetailsID)=[txtPatientDetailsID])) ORDER BY qryPtdetailsRCAforlistbox.PatientDetailsSurname;I have copied the form and renamed it so that I can make modifications to it without affecting the original form (which works fine).
Code: Private Sub cmdViewReport_Click() On Error GoTo Err_cmdViewReport_Click Dim stDocName As String Dim stLinkCriteria As String stDocName = "frmViewReport" DoCmd.OpenForm stDocName, , , stLinkCriteria Exit_cmdViewRCA_Click: Exit Sub Err_cmdViewRCA_Click: MsgBox Err.Description Resume Exit_cmdViewRCA_Click End SubI have tried the following:
if myvalue = "foo" thensomeone would popup right away and say you forgot to close your FOR() loop.
for each c in me.controls
if typeof c is label then
*If you simply want us to give you source code for free, make it reasonable. If you don't know what is reasonable, LEARN IT. Learn the difference between ADVICE and PROJECTS. Asking for too much free knowledge is the worst way to try and make friends in this world. Most professional programmers are way beyond what you're asking for, so they don't mind giving you SOME code for free, because most of it that they are willing to give out has no market value anymore for them (e.g. - they can't make money writing it for someone else. either that, or it's not worth their time). Example - here's some code I am willing to give for free:Code: With Application.FileDialog(msoFileDialogFilePicker) dim varitem With .Filters .Clear .Add "All Files", "*.*" End With .AllowMultiSelect = false .InitialFileName = "c:" .InitialView = msoFileDialogViewDetails If .Show Then For Each varitem In .SelectedItems msgbox "You selected a file with a " & _ right(varitem, 4) & " file extension." next varitem End If End Withan extension of this code example I would not give for free would be one that allows multiple selections of files, consolidates them into one datasheet and imports it into Access for analysis, all dynamically through VBA procedures and object library references. In my eyes, that is a small project.
*If you want helping finding a BUG, be respectful or our time by exhausting all the resources Access gives you before you post your code and say "HELP!" Remember too that programming is a god-awful thankless job by nature, so if you can make a programmer feel good about him/herself, you'll get more help (and words) than you bargained for (which is what you generally want).
*I think I speak for many programmers when I say that if you ask a question that says something like this: "I want my program to do A, B, and C. I would appreciate it if someone could provide the code to do so". It's a light tempered question for sure, but regardless, you won't get an answer, at least from me. And here's why:
1) You have shown absolutely no interest in what you're doing.
2) I suspect you're trying to get source code for free and then sell it. If you want my opinion, that's immoral. Moreover, you're not fooling anyone that cares.
3) You're not trying
4) You're not participating in sharing the information we all seek so we can grow and be better.
WANT TO GAIN RESPECT AND RECOGNITION? TRY THIS...
If possible, know what you're talking about. It makes you look good. Also, try not to mistakenly describe objects when you talk about your issue: My form's control source is "SELECT...etc, etc..." (forms don't have this property).
*I personally believe this forum is great because of the people that hang out here. There are plenty of knowledgeable people here, and lucky for you they are experts in SOMETHING specifically, but also know a little about a lot of other things. As I said before, what you want here is someone who tells you "DO A, B, C to fix your problem". That rarely happens, and most of the time it is because information is lacking to fully analyze the problem, formulate a solution, and then explain it to someone who doesn't initially understand it. Programmers REALLY like to have all the information needed to come up with as many solutions as possible that will work. In reality, it is YOUR responsibility to give that to us if you want the right answer to your problem. I am one for example, that does understand that some people who post here simply have no clue what they're doing, nor do they know what to do with a solution if one is given to them. If you're posting for a good reason and you truly need an answer from us, and you have ZERO experience related to the subject matter at hand, please say so right away. If someone does answer your question, it will save them loads of time by not having to wonder if you "know that already". For me, I have no problem answering these kind of questions. The point at which I become frustrated, and probably unsubscribe from your thread, is when I find out that you "knew that already" or "tried that already" when I spent time explaining it or typing it (whatever it is). If there is anything I dislike (and I like a lot of things in this world), it is wasteful use of time. So...in short, if you know what information we need to solve the problem, please give it to us. Don't guess. If you don't know what info we need to solve it, just say so and don't worry. We probably know what we need even before you say it. Here are some good examples of questions and the information we would need to give you the right answer the FIRST time so you can live happily ever after without much fuss:
Question: When I try to lock a textbox with VBA, it doesn't lock.
We Need: 1) the code you're using, 2) the value of the "allow edits" property of the form
Question: Why doesn't my subform show any records?
We Need: 1) subform's source table or SQL that runs it, 2) any initialization code behind it (code that is run when its loading or opening), 3) any links to a parent form it has
Question: I am getting a "type mismatch" error in my procedure...
We Need: 1) the line of code that Access says is bad, 2) what words in the code the debugger is highlighting, 3) any variable names and their data types that are inside the error-ridden code
Question: It tells me "No Current Record"
We Need: 1) what you're trying to do at that particular moment, 2) highlighted code if the debugger can be run to find it, 3) what you did right before you got the error, and any code that was run
MY THOUGHTS ON BEING A GREAT PROGRAMMER
I am nowhere near "great", but I have picked up on things that have taught me a great deal about the art of programming. Weather you're serious or not, if you are interested at all in learning anything about how programming works, be it software structuring, OS structure, script writing, or software engineering, try to post questions that will someday give others a chance to gain at least 1 more byte of knowledge. People who answer your questions will have more respect for you too!
Page 1 of 2.
Results 1...20 of 34