You found it okay?
You found it okay?
FWIW, it's about the only way to select controls or labels that have been (because they have to be) placed behind some other control. Say you need to place a rectangle behind another control to perform some sort of conditional highlighting. You cannot select the control in the lower layer because it's behind the only one you can click on.There is a way actually. With a form/report in design view and the properties window open, there's a dropdown at the top of the properties window. You can select the desired control there and Access will select it in design view.
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.
Yes, I found it. Thanks.
Respectfully,
Lou Reed
I have a new form that I created with a button and some legacy code from a previous db. I would like to try this it seems very direct so it should be easy to work. However, when I have the events properties for the button control on the new form, if I click the button and select code builder then I will get just the first and last line of the Sub. It will not link existing code. This is the point of confusion.Code:As long as the names of the buttons on both forms are the same, it is a quick fix. Just go in to the events properties for the button control on the new form, click the ... button, and select "Code Builder". Access will link the existing code to that button.
I have some legacy code and I have a button on the form (new button and new form). I just do not know how to link them together. Please elaborate on the statement above.
Respectfully,
Lou Reed
The previous post by me is important to my work today. I need answer to this post if it is at all possible.
I have some code from one db that works and a form with certain buttons on a new db the control have no VBA code behind them. I would like to connect up
the old code with the new buttons.
The method described here does not say how to get a to point where I can simply connect up the button. Right there is no code behind the form with only buttons on it.
Somehow I must copy and paste the working code there. That is the easy part. The hard part is getting a form to show me the area where I can start pasting the old code.
The only way I know is to select control and then select ellipsis and then it gives you the first and last lines of the db. I do not need these first and last lines. I need only to paste the code and connect it to a control (usually a button in my case). But first I must get the blank page open for pasting code. How do I do that?
Respectfully,
Lou Reed
You can't "link" them. You have to copy-paste the old code into the sub for the button on the new form. As long as the button names are the same, you can just overwrite (i.e. delete) the two lines that Access automatically starts with.I have some legacy code and I have a button on the form (new button and new form). I just do not know how to link them together.
One major caveat with this method is that you have to be sure that the code you paste in does not refer to controls or other objects that you haven't created yet. Compiling the code will often catch these for you, but not always.
Okay, I will get it a try. Thanks for your input.
Respectfully,
Lou Reed
Okay, on this form I have two Subs one says Form_GotFocus() and the other says Form_Load().
I know of no way to connect this code up to the controls on the form. It is not like Form_btnRefresh() where it is obvious what control is associated with what code Sub.
Any help appreciated. Thanks in advance.
Respectfully,
Lou Reed
that code is not for controls - it actually tells you that it's for a form. Go to where the original code is on the same form and copy/paste as suggested. I for one would not delete all the lines; I'd leave the first and last intact and paste what comes in between. My fear is that if you create the start of the procedure from the property sheet via the ellipses (...) then delete it and paste all of the procedure, that the event becomes orphaned from the control or object. Probably would not happen unless you saved or compiled the project before pasting the entire event code, but it happened to me once. It's one of those things that once it happens, you tend to avoid putting yourself in that situation again. Probably 99 times out of 100, it won't be a problem.
BTW - while you are in any module that belongs to a form or report, that object is highlighted in the project window (where all the form/report/module objects are listed). That's one way of knowing where you are.
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.
You mean to just copy and paste from the form with all the existing VBA code for frmAttendance to the new frmAttendance in the new db. There is no need to connect these? Just copy and paste?
Any help appreciated. Thanks in advance.
Respectfully,
Lou Reed
More than no need - you can't connect them. Event subs for a form have to be in the code module for that form. Access will not look elsewhere.There is no need to connect these?
But I have a question - is there a reason why you do not just import the whole form from the old database into the new one, rather than recreating it from scratch? It would save you a whole lot of trouble.
This form has gone through many iteration besides the VBA code. Importing it was the first thing I tried. It was really a bad idea. They were just too different.
However, now I am taking it piece by piece. Importing the form was a nightmare.
Respectfully,
Lou Reed
Please elaborate on this. I am anxious to try t. Is there a reference for it?
Respectfully,
Lou Reed
I don't know of a reference, but I thought you found it? You said you did in post 18. It's here:
Okay, I will try it. it is just that MS Access can get complicated and then it becomes quite opaque.
Very opaque.
I thanks you for your help.
Respectfully,
Lou Reed