Forum Discussion
Northwinds 2.0 template Help
- Jul 06, 2023Thanks for the thanks. I will pass it along. Stay tuned; v2.2 is not too far away. Also note the videos that have been posted on YouTube. The team has already discussed many aspects of NW2 and several recordings are available.
> I also wonder if working directly in the table might be causing an issue?
Yes. That is why I am using a text editor. The Access built-in textbox definitely has issues with larger XML formatted files. I never edit directly, nor in the textbox on frmSysRibbons.
I'm one of the creators of NW2.
What I do is create a new form bound to USysRibbons, so I can easily replace the XML.
I always make a backup first, because (as you found out) it is easy to break things. The XML is case sensitive and VERY picky.
I copy the XML to a text file (I use Notepad++ with an XML add-in, and I save the file as "ribbon.xml" so I get syntax highlighting), and edit it there; not in the above mentioned form - that is just for copy/paste.
Editing xml is mostly a matter of copy/paste an item.
Same thing for the callback functions in modRibbonCallbacks: VERY picky.
Once you are more comfortable, this web site is the one I use for all the finer points of the XML: https://www.accessribbon.de/en/
Tom_van_Stiphout Thank you VERY MUCH for the quick response! I've been working with Access almost from the beginning and I'm always on the lookout for a good template for apps I build and maintain. I think I've done everything you suggest except that I use PSPad as my editor and I've been saving my working code in a TXT file, rather than XML. But I make the mods in the editor and then copy-paste them into the memo field of the USysRibbons table in the database. I will try renaming the text file to XML and letting my editor syntax check it to see if that turns up anything. I also wonder if working directly in the table might be causing an issue? When it "breaks", the app opens, asks me to log in and then goes to the Orders screen, as expected, but the ribbon doesn't change (it remains the default one). There are no error messages, but I assume the XLM code "failed" when loading? Using the same editing process to remove the 5 lines of added code for the new button seems to fix things.
Thanks again, a thanks to the entire NW2 team for a great template.
- Tom_van_StiphoutJul 06, 2023Steel ContributorThanks for the thanks. I will pass it along. Stay tuned; v2.2 is not too far away. Also note the videos that have been posted on YouTube. The team has already discussed many aspects of NW2 and several recordings are available.
> I also wonder if working directly in the table might be causing an issue?
Yes. That is why I am using a text editor. The Access built-in textbox definitely has issues with larger XML formatted files. I never edit directly, nor in the textbox on frmSysRibbons.- BajaRic2009Jul 06, 2023Copper ContributorWell, I have to say "Thanks!" one more time. I renamed my text file to XML, opened it with PSPad, made the same cut-and-paste changes I had already tried a dozen times, copied the modified text into the memo field (after deleting the existing text), closed the USysRibbons table, closed the database, reopened it and BINGO! the new button I've been trying to add was there! Someday I'd like to know the "why" of all that, but for today I'll take working code as a win!
Problem solved!- Tom_van_StiphoutJul 07, 2023Steel ContributorTo turn on or off the XML error reporting when you open your Access app with ribbon, use this registry key - Thanks to Gunter Avenius:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\16.0\Common\General]
"ReportAddinCustomUIErrors"=dword:00000001
Or
"ReportAddinCustomUIErrors"=dword:00000000