Access 97 - how to edit/explore existing toolbar? - ms-access

My current job is updating an existing Access97-Project. I haven't worked with Access in a long time and i can't find out, how i can explore a toolbar called "sbmbDrucken" which is obviously user-created. I just need access to the action or the code which is called by the buttons...
Is there any menu entry i missed or do i need special code for self-inspection?
TIA!

There are three different ways for menus/toolbars to be instantiated:
the old way, using macros. Before A95, this was the only way, so a lot of older apps (i.e., those converted from earlier versions) may still use macros for the menus.
defining them by hand, using the CUSTOMIZE function that you get when you right click on a toolbar in Access.
in code, using the Application.Commandbar object.
For the first you can browse your macros and see if any of them are menu macros.
For the last, you can do a search in the code for CommandBar.
For the second, just look at them through the built-in menu customization tools. Keep in mind that you may have to check them off to get them to be visible, and that the list is in no rational order. Likewise, some menus/toolbars are hidden from the customization interface. Also, you might need to look at the CUSTOM toolbar menu item.

I don't have Access 97 on hand but you may take a look of this webpage: http://www.alvechurchdata.co.uk/hints-and-tips/accaddtoolbar.html
It seems that "user-created" toolbars could be defined by handwritten code at form.load or somewhere similar. You may search CommandBars.Add and see if you can find those relevant code segments.
Hope that helps.

In the design mode, you will be able to see the toolbar & actions assigned to each of the button.
Right click on the specific toolbar
Click on Customize...
Right click on the button you would like to edit the action of.
You will be able to see the action (which could either be macro or code).
Let me know, if that doesn't help at all.

Related

Dropdown select with delete option next to each option value

I need to implement a drop-down which has a delete 'X' option next to each option item. Somewhat like the image shown below.
The drop-down is populated dynamically and I need a way that does not inlvolve using list as an alternative.
EDIT: The icons next to each dropdown item refers to 'Edit'/'Delete'
You cannot put a checkbox into the usual <select> or multi-select HTML element.
However, here is another question where several good options are discussed.
This looks like the most useful and best suited to your purpose:
https://stackoverflow.com/a/27547021/1447509
And here is an example of how to change the default checkmark to an X:
https://stackoverflow.com/a/40123793/1447509
Sources:
How to use Checkbox inside Select Option
After selecting check box Instead of Tick symbol need X in html
UPDATE:
Given that you need both the HTML markup and the javascript to make it do what you want, you have two (possibly 3) steps to do:
This answer provides a good example of how to create the custom-rolled <select> control.
This answer shows you how to replace the checkbox created in step 1 with an icon/image of your choosing.
The javascript to remove the x'd <option> is very simple:
$(this).closest('option').remove();
IF you also need to save these results, then you also need to learn:
4a. Server-side SESSIONS (so that each user's customizations are saved for them)
4b. A login system, so you know for which user to save the current customizations.
4c. Just the basics of how to use a back-end database, such as MySQL/MariaDB, in which to store the user customizations.
4d. AJAX - so you can schlep info to the back-end for insertion into the database without refreshing (or navigating away from) the current page. AJAX replaces the ancient and no-longer-used <form> construct. Frankly, once you've used AJAX a couple of times, you'll never go back. Totally easy.
If you are in a bind and need someone to create the whole thing for you, I refer you to one of these websites - I have used such services myself and can recommend them.

How do I automate tab selection on a website

Here is the website I am trying to access. I dont want the default tab (Day) though, I want to select the Season tab
https://www.eex.com/en/market-data/power/futures/uk-financial-futures#!/2017/05/23
The link appears to be exactly the same whichever tab is chose making differentiation impossible as far as I can tell.
Any help on this would be much appreciated, using whichever programming method and language is appropriate.
Kind Regards
Barry Walsh
The URL does not change since this is an ajax request, which you can see from MarketDataTableAController's getPageData function. You can read about them here https://developer.mozilla.org/en-US/docs/AJAX/Getting_Started
Ive inspected your html and you seem to be using angular. On further inpection you can see that the tabs have ng-click="setActiveTab(tab)" attribute on them. So whenever user clicks, this function gets executed. It is a matter of using this function with the appropriate tab object to get the content to change. You for example could put setActiveTab(tab) into your controller init method since setActiveTab() calls the forementioned getPageData() function to update the page.
Also the tab you are looking for is page.tabs[5] ($parent.page.tabs[5] if referring from TabController) since this is the tab with the label of season. Pass that to setActiveTab() and it should show you the season instead.
However this might not be a good solution since the tab array ordering might change. Then you would need to loop over all objects in page.tabs and see if tab.label === "Season" and pass that in the function instead or better yet use the $filter service provided by angular which would look more cleaner.
Your code source also seems to be minimized and its not very easy to read.

How to set focus on tab in tabcontrol in URL

I am trying to call a page in my customers webapplication (Exact Synergy Enterprise)
This is the link: http://someserveridontdisclose/Synergy/docs/CSCANEduCourseCard.aspx?ProjectNr=ACPGINTV
Within this page is an Ajax TabContainer with several TabPanels. One of them is called 'Doelgroepen'
I dont have the source for this application, as i am not the developer of it. We only develop custom extentions to it.
Here's the question: Is it possible to focus on one of the tabs USING ONLY AN URL? If so How?
Thank you very much for your thoughts about this.
try to set with javascript. you'll have to write your own js to get index number you want from url, then set like this
$find('<%=TabContainer1.ClientID%>').set_activeTabIndex(2);
http://forums.asp.net/t/1127834.aspx
http://www.aspforums.net/Threads/420684/ASPNet-AJAX-TabContainer-Set-Active-Tab-Client-side-using-JavaScript/
If you do not have access to the code and if this is not part of the requirement / design specification for the application you are using (ie: what you asked the developer to do), then the answer is No.
The control does not have "native" support for URL tab selection. There needs to be specific code in the application in order to handle this.
It is however very easy to implement, if you absolutely need it, it shouldn't take much time (about 15-30 lines of code, depending on how many tabs/urls combination you need).
You can find a running sample of the AjaxControlToolkit Tabs control at the following link (the available functionnalities are described in there):
http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/Tabs/Tabs.aspx
If the TAB has an ID you could make it visible by adding '#tabid' to the URL.

Command Button Wizard doesn't start

I want to create a navigation button on a web form. (I use MS Access 2010 - Web database). I dragged the button on the form (the Control Wizard option is selected) but the Command Button Wizard does not show up
I double clicked on the button, but it just let me to edit button name. I also tried to click anywhere on the form - still nothing
How do I show Command Button Wizard Menu for my "Command120" button??
You have to enable the control wizards first. Go to the drop-down arrow at the end of the control group on the design ribbon and select use control wizards. Then insert the button again.
I had the same issue. I created the button the form in design mode and this seemed to get it working in layout mode again.
After all of the answers above, I still could not get it to work. What appears to be the problem in my case is that the wizard will not work inside of sub-forms. The solution is to:
Open the sub-form directly instead of designing it inside the parent form.
or
Create the button on the parent form, then cut or paste it to the
sub-form.
So this is a really old question and but I have found out the answer to the problem and will share in hopes that it may help someone in the future.
If the form is a "Web Form" the control wizards do not work. It must be a standard form. As far as I can tell there is no indication of this anywhere. To see the difference see the image below.
The form on top is a regular form and the one whereas the one on the bottom with the little globe is a web form. In order to create this kind of form Go to the create Tab and DO NOT select the options in the menu. You must select blank form from the Client Forms drop down as shown below.
There you will find the option to create forms that don´t have the little globe and those are the forms that work with the control wizards. Hope this helps someone else! This was a real pain to discover.
Enable the "Use Control Wizards" At Design tool tab.
Then add the button to Design are.
That's all
Make sure your wizard button in the drop down arrow is on if it is turn it off and then turn it back on then recreate your button. That worked for me in a layout view. Good Luck!!
If Sandy's answer didn't work for you, try to switch first to Layout View then proceed.
It worked for me.
I actually landed here looking for a solution. While I didn’t find it here I did figure out what I was doing wrong.
The action wizard only works with boundControls. So the area you are trying to use is not connected to a relevant table or field.
1st off make sure that you have the wizard activated/Turned on then proceed.
Option 1 [From LayoutView]
I was able to get the wizard to work by 1st deleting the button.
Then delete the cell you are dropping the button onto.
Then I stretched the cell with a field name to the right where I wanted my button.
Then I split the fields Horizontally.
Last I dropped the button on the cell I just created adjacent to the field & voilà the wizard came-up.
Option2 [From DesignView]
Again remove what isn’t working 1st. Then drop the button where you want. The wizard should pop right up. The button won’t be where you wanted it to be, but you can always move it once you get it setup.
I read that you tried it in DesignView & it worked, but crashed Access & you lost your Macros, so just a reminder to everyone try this with a copy or test db.
HTH
Links I found helpful.
+--------------------------------------------------------------------
https://stackoverflow.com/a/13010098/6158704
https://support.office.com/en-us/article/Introduction-to-controls-4a8cf5f2-d739-4ae9-b1e0-510c3f4d6975
+--------------------------------------------------------------------

Access 97 VBA writing code

I found that I can write code just by typing everything or activate element, then click for example OnClick property and write code to between the sub-end sub lines.
One person I met said that one has always use mouse and select the property in which you want to write the code, as it might write something else to some files such that the code won't work.
Is this correct or are those two ways to write code equally good? I'm using Access 97.
The short answer is you CAN do it that way. But it doesn't mean you SHOULD.
With a little experimentation I've found that you can type in event subs directly in the code window, and their creation will be reflected in the properties window. This might not have always been the case in older versions of MS Access.
You can also create them by selecting the Control in the code window's top left pull down, and then selecting the event in the top right pull down.
Why would I choose to use the Code Builder (or at least the second option I provided). Because it prevents you from making mistakes. Both in the name of the control/event and in accidentally creating duplicate Subs. Both of which could be frustrating when debugging your application - how long could you spend looking for a bug because you added an extra "S" to an element name by accident. If you follow through from the properties window, you are guaranteed to be working on the right Sub and that it will be spelled correctly.
Note: I've also found that you can delete the entry in the properties window, but it leaves the code behind in the code window. So to make sure it is really gone, you do have to go into the code window and delete the Sub there.
That's not to say that I never do anything directly in the Code window like that - if I've renamed a control, I'll often update the name in the code window. But then I'll go back through the properties window to verify that I've re-connected the subs properly.
"Look, I'm running with scissors!"