			Access 2007 NORTHWIND.ACCDB Sample Database

This document provides helpful information about compiling, debugging and running
the converted Access 2007 Northwind.accdb sample database project.

All Access Queries, Forms, Reports, Macros, Modules and the Visual Basic project file are
converted without errors. The converted Visual Basic project file loads into Visual Basic
and may produce the following error. 

	Errors during load. Refer to...\.log for details

Check the .log file that is created for the Form that caused the error. An error like the
following may be in the .log file


	Line 138: Cannot create embedded object in Picture. 

The Categories Form when opened produces the 'Errors during load' message and the .log file
contains the lines

	Line 138: Cannot create embedded object in Picture.
	Line 138: Cannot create embedded object in Picture.
	Line 138: Cannot create embedded object in Picture.

The Employees Form when opened produces the 'Errors during load' message and the .log file
contains the lines
	Line 519: Cannot create embedded object in Photo.

The Employees__Page_Break Form when opened produces the 'Errors during load' message and
the .log file contains the line

	Line 276: Cannot create embedded object in Photo.

These errors indicate that a particular OLE Image or Picture control on the Form is unable
to create a link to its image source. To fix the problem, open the Form that contains the
image and right click on the image or picture control and select the Create Link menu item.

The following error may display 

	Source Document is not set 

To fix this error set the SourceDoc property for the control using the Properties window. 

Running the converted Visual Basic project produces no errors and the Startup Form displays.

Note: Re-run the project after fixing each error

1. The Startup Form does not display like its Access counterpart because the GrayBox Shape
control hides all the underlying controls except for the HideStartupForm CheckBox and the OK 
Command button.

2. To display the other controls on the Startup Form...
- Right-click the GrayBox Shape control and click the Send to Back menu item on the popup
   menu that appears or
- Press Alt-O-O-S or
- Press Ctrl-K

3. The Logo Image control does not display an image because its picture source is embedded.

4. The OK command button when clicked will do nothing because the event for the button calls 
the Function =CloseForm() that resides in the Startup Module.

5. The Startup Module is not loaded with the converted Visual Basic project because only the 
Form Startup was converted since the Form and Module in Access both have the same names.

6. Convert and load the Startup Module separately into the Visual Basic project.

7. To get the OK button to work, double-click the button and type the following code in the
Click event
	
	Dim vntReturnVal as Variant
	    vntReturnVal = CloseForm()

8. Since the CloseForm() function simply closes the Startup Form, you can type the following 
code instead of the previous code in step 10
		
	Unload me

9. Running the project now, and clicking the OK button on the Startup Form will close the Startup Form. To display the Main Switchboard form, do the following...

10. From the Project menu select the Properties menu item and change the Startup Object to the Main_Switchboard Form.

The following errors may display

11. Compile error: User-defined type not defined, on the line
	Function IsItMDE(dbs As Database) As Boolean

To fix this error, set a Reference to the Microsoft DAO 3.6 Object Library

12. The Main Switchboard Form should now display

13. The Main_Switchboard Form contains only 2 Command buttons (DisplayDatabaseWindow and the 
ExitMicrosoftAccess Command buttons) that have events associated with them.

14. The other 5 Command buttons all point to functions in Modules.

15. The Logo Image control does not display an image because its picture source is embedded.

16. Clicking the DisplayDatabaseWindow Command button will close the Main_Switchboard Form.

17. Clicking the ExitMicrosoftAccess Command button will close Visual Basic.

18. All Access DoCmd commands that have no equivalent Visual Basic syntax are commented in the source code.

The previous steps outline how to make changes to the converted Access 2000 Northwind sample 
database code and make the application run in Visual Basic. Use this document as a guide to
compiling, debugging and changing code behind converted Access Forms and Modules.

For additional information, refer to the online Help or email support@iriesoftware.com

Your feedback is appreciated.

