Just wanted to pass a link for the updated XFDL in MS Access Project. Included in the zip are:
AccessXFDL – This folder has a working example of opening an XFDL form in access. Does not work for all forms yet but will produce a form for most XFDLs.
libxfdl – This is the DLL made for an extension to VBA to take a part XFDL files and return a string of the data.
Here’s the link: http://dl.dropbox.com/u/18666533/AccessXFDL.zip
As much as I do not like VBA, I do like the “User Defined Types” which, from a C/C++ programmer’s prospective, this is a lot like using structs. And for data management, which is probably 90% of what VBA is used for, it makes a lot of since. How do we define a User Defined Type?
Private Type dict
a As Integer
b As String
c As String
d As Integer
Once Defined, we need an initialization function to store the struct.
Private Function defineDict() As dict
defineDict.a = 1
defineDict.b = "two"
defineDict.c = "three"
defineDict.d = 4
At this point, we can use the same calling to to that ‘struct’ to change the variables as needed.
Dim t As dict ' Set the variable
t = defineDict ' Initialize
Debug.Print t.b ' Prints >> "two"
t.b = "no more" ' Change a variable
Debug.Print t.b ' Prints >> "no more"
Okay, so I’ve updated my code and I’m ready to release to the world my NCOER speardsheet. Here’s a quick tutorial on how to use it.
- Download the Excel 2007 or Excel 2003 version. (Right Click and Save As)
- Ensure that you have enabled macros [ Office 2007 ] or [ Office 2003 ] for your MS Excel.
- Open the file you downloaded.
- Enter the unit you need the report for in the textbox on the left.
- Click Update
- It will prompt you for your AKO Username/Password to access the data.
- Wait a short time and it will automatically load and filter.
- Print or export the data as needed.
And that’s it. I know military types read this blog (proven through the Open XFDL project) so please comment and let me know your opinion!
I know, I said it yesterday that it is rare that I develop on Windows, but this is a long promised application. In 2007, my unit administrator (in the U.S. Army Reserves) suggested code that would allow batch loading XFDL forms from MS Access. Due to the scope of the Apps 4 The Army project, I was limited to using a web application. Now that the project is submitted and done, I am free to do my original plan, which is code to do the same process in MS Access.
Starting this today, I realized how much I hate doing Visual Basic. Particularly, VBA is very painful!! It’s not that the language is bad but it just always feels bulky and pieced together to me. It seems to lack the professionalism of C/C++ and the flow of Python. But, I may be alone in that.
I have a question for my readers though. Would anyone have an interest in seeing this project on SourceForge? The Apps 4 the Army project is no longer my intellectual right, but a desktop application, a MS Office Plugin, etc… that’s all good to make public. So let me know, if I get readers saying we’d like to help; then I will happily move this project to SourceForge!