Have a new form that contains controls and is linked to a table in SQL Server. Have code that relinks the table on open, and that code works in 5 other apps, but not this one. Here is the code:
Dim tdf As DAO.TableDef
For Each tdf In CurrentDb.TableDefs
' check if table is a linked table
If Len(tdf.Connect) > 0 Then
tdf.Connect = "Connect String"
tdf.RefreshLink
End If
Next
I had the form set up in options to open when the app is activated, but it ask for the password which I have in the connect string. I have entered a stop on a line of code in the in open event, but that code never executes. It's like the onopen event is being ignored.
Thanks jpl