Access VBA: How To Call A Windows Form Application with Arguments

To call a Windows Form application (*.exe) with arguments in VBA, you use the Shell() function. Shell "C:\Dev\SampleWinFormWithArgs.exe arg1", vbNormalFocus   Inside the Windows Form application, you get the command line arguments using Environment.GetCommandLineArgs(). string[] args = Environment.GetCommandLineArgs(); // you can call GetCommandLineArgs() anytime, anywhere foreach(string arg in args) { // do stuff // note …

Continue reading Access VBA: How To Call A Windows Form Application with Arguments

Advertisements

SQL Server: Quick Notes on SYNONYM, MERGE, TRY_CONVERT, TRY_CAST, PARSE, TRY_PARSE, CHECKSUM, ISNULL, COALESCE, NULLIF, and JOIN

SYNONYM Starting in SQL Server 2005, you can use SYNONYM in place of their referenced object in SQL statements.  It’s like an alias.  The benefit here is that if you decide to alter the name of the object being referenced by the synonym, let’s say you want to change the name of the table or …

Continue reading SQL Server: Quick Notes on SYNONYM, MERGE, TRY_CONVERT, TRY_CAST, PARSE, TRY_PARSE, CHECKSUM, ISNULL, COALESCE, NULLIF, and JOIN