How do I convert an Access UPDATE query to SQL Server? Access SQL UPDATE Cars INNER JOIN UpdateList ON Cars.Parts = UpdateList.Parts SET Cars.Price = [Updatelist].[price] SQL Server UPDATE Cars SET Cars.Price = [Updatelist].[price] FROM Cars INNER JOIN UpdateList ON Cars.Parts = UpdateList.Parts
Use properties instead of constant or magic numbers
A common programming mistake is to hard-code literals that corresponds to some property. That is particularly true with certain controls like tab controls & pages. The tab control exposes a Value property that indicates the current tab and the pages contains a PageIndex property that indicates its position in the tabs of the control. Thus,…
How to Migrate Data from Access to SQL Server using SSMA (SQL Server Migration Assistant)
SSMA is used to migrate Access databases to SQL Server. This tool converts the Access database to an SQL Server or an SQL Azure database. It is not bundled with SQL Server – you will need to download and install this tool separately. Check your system requirements and view the installation procedure for SSMA. Preparing…
Microsoft Access File Extensions
Microsoft Access saves information under the following file formats: File Format Extension Access Project (2007, 2010) .adp Access Blank Project Template (2007, 2010) .adn Access Database (2007, 2010, 2013, 2016) .accdb Access Record-Locking Information (2007, 2010, 2013, 2016) laccdb Access Web App Reference .accdw Access Signed Packages .accdc Access Database, used for Add-ins .accda Access…
“Too Few Parameters” error fix
Symptoms Whenever you run a SQL statement you get a “Too Few Parameters, expected X.” Cause Most common cause is misspelling or missing fields in the SQL statement. Resolution Check the SQL statement. If necessary, copy and paste to an Access query and test in the query to get it to highlight which part of…
Hiding the Navigation Pane with VBA
Once you have created an Access Database Application to be used by other people, it may well be important for you to prevent users from gaining access to any of its design features. By this I mean, you may not want users to modify your tables, forms and queries etc in design view (inadvertently or…
Prefer compile time errors over run time errors
In VBA, there are several features that allow us to do things that may not be checked at the compile time. In particular, it is possible to write several late-bound expressions which means that it can potentially contain run-time errors. One common misconception about late-binding is that it’s a matter of adding a reference and…
Access InStr() function to SQL Server equivalent
What is the SQL Server equivalent to Access InStr() function? TargetField: String expression being searched SearchValue: String expression being sought StartPosition: Starting position for each search (optional) Access SQL InStr(TargetField, SearchValue) InStr(StartPosition, TargetField, SearchValue) SQL Server CHARINDEX(SearchValue, TargetField) CHARINDEX(SearchValue, TargetField, StartPosition)
Drag & Drop and Conditional Sorting in Microsoft Access
Drag and Drop In MS Access Doug was on a roll in January of 2004 when he wrote his article on drag and drop in MS Access. He tested it now using Access 2016 and it still works. This article shows you how to add drag-and-drop to your Access application using combinations of multi-value and…
Use controls, not fields
Sometimes we need to use fields from a RecordSource that aren’t shown on the form. It is legal to reference them directly even if they don’t have a control. For example, we can have a form bound to a RecordSource like so: SELECT c.CompanyID, c.CompanyName FROM Companies; And only display CompanyName in a textbox but…