This would be a great addition instead of what I currently do which is putting a label above it with all that column names, but doesn't really work now for me due to DPI issues ect.
What I'm doing is creatng a VB.Net DLL and adding it as a reference to the Access DB. Create and I/O interface, and get all the riches of Visual Studio with Entity Framework, parallel processing etc.
No brainer consider the snail's pace progress of fundamental MS Access functionality.
Pitty this won't go anywhere. You can always use SSMS to create your queries and then use passthrough SQL queries using something like the following hack:
Dim qdf As DAO.QueryDef
Set qdf = CurrentDb.CreateQueryDef("")
qdf.connect = "ODBC;Database=tsfe;FileDSN=C:\settings\tsfe.dsn;"
qdf.sql = queryStr
qdf.ReturnsRecords = True
qdf.ODBCTimeout = 0
Set SQLOpen = qdf.OpenRecordset
Set qdf = Nothing
We are designing on a new Linked Table Manager dialog, incorporating suggestions and requests made in UserVoice and other forums.
One obvious way to improve the Linked Table Manager is to allow Shift key to work so that you can select a range of tables in one go instead of doing Control click on every table, very poor design. Also remove all the sql internal tables not relevant to an Access Database would be a bonus, but the shift select would be a boon.
You could automate this process. I only link to one SQL server, but no limitation on retrofitting the below hack function:
Dim i As Long
Dim tableName As String
Dim rec As Recordset
Dim r As Long
For i = 0 To CurrentDb.TableDefs.count - 1
tableName = LCase(CurrentDb.TableDefs(i).name)
If InStr(1, tableName, "msys") = False And InStr(1, tableName, "~") = False And InStr(1, tableName, "temp_") <> 1 And tableName <> "name autocorrect save failures" And tableName <> "paste errors" Then
DoCmd.DeleteObject acTable, tableName
DoCmd.TransferDatabase acLink, "ODBC Database", "ODBC;DRIVER=ODBC Driver 13 for SQL Server;UID=administrator;DATABASE=tsfe;WSID=razorbladeAPP=2016 Microsoft Office system;Trusted_Connection=Yes;SERVER=razorblade;DESCRIPTION=MSSQL_TSFX", acTable, tableName, tableName, False, True
MsgBox "SQL Relink Completed"
Joe/Mark, I'll give your suggestions a go, thanks. I also redesigning the Access Front end to be more "organic" (some of the code is 15 years old), to not require dynamically generated (or pre-generated) controls to exist.
Hiding/unhiding existing controls is exactly what I do at present, it's just a real pain to create many hundreds of controls for certain "dynamic" forms to cover the worst case scenarios. Just would be nice and easier to programmatically create the correct amount through code in real time.
If I'm not mistaken, from my quick test, CreateControl only works when you are in design or layout mode not a live mode. Perhaps you could create a form live using CreateControl and save and open it, but what I'm after is having a pre-existing form where you can dynamically add new controls as you see fit in a live situation.
Please correct me if I'm wrong.
11 votes4 comments · Access (Desktop Application) » External Data Connectivity · Flag idea as inappropriate… · Admin →
I can confirm Anders comment, it's a fantastic titbit particularly when you get referential integrity errors and want to know the culprit easily.