Okay, now I have two stupid feel-like-an-idiot questions. Once I put this code into this one label, is there not a way to just copy this same code into each of my command buttons throughout my database or do I have to complete the same steps each time for each new button? Also, I think I am missing the forrest because of the trees; is there anywhere in this website I can do a search by THREAD? Thanks guys, JL
I'm afraid making lots of buttons like this could be pretty laborious.
In the best case, which is making an exact duplicate (including the Caption) on another form, you can select the two labels and the command button together, copy, and paste onto the other form. Then select all the code for the command button, copy, and paste that into the other form's module.
To duplicate a button on the same form takes a bit more work. You still copy and paste as above, but you'll have to change the caption and size of its little (caption/focus) label. You'll probably also want to change the names of all three controls. After you do that, you can copy and paste the code into the same form module, giving you duplicate procedures. You then have to select the code you pasted and do a Find/Replace operation (using the Selected Text option) to rename the controls in code. Fortunately, when you do the Find/Replace, Access automatically sets the event properties for the new "button" to "[Event Procedure]" for you, so at least you don't have to do that.
By "search by THREAD" do you mean search for a thread, by thread number? No, I don't think you can--but usually, you shouldn't need to. If it's referenced in a post, text with the format "Thread702-537223" will automatically become a link to the referenced thread. If you want to track a particular thread, you can mark it for email notification and sort your forum threads with the marked ones at the top (see the "Thread Order" sort options at the top of the forum's main page).
If you have some other need, let us know what it is. It may already exist, and if not, I'll suggest it to the management as a possible improvement. They're very open to improving the site.
Rick Sprague
Want the best answers? See faq181-2886 To write a program from scratch, first create the universe. - Paraphrased from Albert Einstein
Paul.....try the "E-mail This Thread" button and email it to yourself.....outside of the, just copy past the entire thread into a word or notepad file....
****************************
Only two things are infinite, the universe and human stupidity,
and I'm not sure about the former. (Albert Einstein)
Robert L. Johnson III
MCSA, CNA, MCP, Network+, A+
w: robert.l.johnson.iii@citigroup.com
h: wildmage@tampabay.rr.com
Thanks Rick. I print and save all threads that are helpful in case I need for future reference. Some of these threads are ones I have not participated in. But, they may have changed since I printed them out, so two or three times in the past couple days I have wanted to just type in the thread number so it would take me right to the thread. Sometimes a search by word is vague. However, I did start doing the search by handles and that was okay. So, I appreciate all your comments and helps. Pink star to ya, Janet Lyn
How about doing a search using the entire subject line, and the "All the words" and "Subject" options? It seems to me that would almost always retrieve just the one thread you're interested in.
Rick Sprague
Want the best answers? See faq181-2886 To write a program from scratch, first create the universe. - Paraphrased from Albert Einstein
Robert and Rick, I just had to come back to this thread and give you both another pink star. Man, the sink and unsink on the button looks GOOD. Thanks again. JL
Yakdogs, that is what I did also. But make it look better by doing what mstermage1768 said above with the sink and unsink. It really makes the form more realistic. There is a box above with really long code and mstermage remarks are two boxes down. Well worth the read. Janet Lyn
If you are referring to my code being so long, it's ok. It is rather long, but that's only because in the given example, I'm using 4 controls x 3 events, Mouse up, down and move. Which I've had to, to give the "Hover Button" effect. The code also by using:
If X > 0 And X <= 365 And Y > 0 And Y <= 330 Then
allows the user to change their mind if they click a "button" by mistake to drag the mouse off the "button" to cancel the click, just like on a "real button".
I have promised in another thread to add a "New Record" button to my example. While doing this I will see if I can shorten the code, but it's ulikely.
I've often said this, that I love Tek-Tips for all the different views and methods demonstrated. I've always worked on my own and got my examples from Help or manuals. It's been quite an eye opener using this site.
Anyway, the main thing is that you got what you wanted from all the great contributors above to this thread.
No, No, Bill, I would never insult anyone on this forum. I like everyone too much. Besides, any code given is code I can refer to later and pick up snippets of how to write code for my specific situation. The reference to the long code was to Norris68 and I only referenced it so if Yakdogs wanted to find the code I was talking about he could just start up the screen and find the long code and then go down two boxes instead of having to read every box trying to find my reference. Thank you for your help. I have already downloaded your code, just haven't decided whether to use it or not. I have not gotten around to playing with the stuff like taking off scrolls, menus, toolbars, etc. When I do, I'm sure I will be calling your name. Have a wonderful day. Janet Lyn
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.