Macros in upsized Access

Miroslav

New member
Local time
Today, 02:21
Joined
Jan 28, 2015
Messages
7
Hi! I am new at Access. I made simple application with navigational form which should edit some data. Search button is connected with Macro built in Macro editor. I upsized my Access file to SQL. Macros doesn't work after upsizing. I find that I would have to solve it by writing triggers in SQL. I'm new in SQL too (I have installed SQL Management Studio for the purpose of upsizing). Could somebody tell me (in general) how to solve my problem (how to write those triggers if it is necessary or where to learn that)?
 
What is the macro behind the button? I would expect it to continue working. A trigger would be a more logical replacement for a data macro.
 
It searches data which was in Access tables before upsizing, but when I update data in sql (backend) I cant search data I imported in SQL. I can see them when I open linked table, but macro does not search through them.
 

Attachments

  • Macro.jpg
    Macro.jpg
    87.3 KB · Views: 217
Hmm, did you *fix* you Table names? When upsizing they get prefixed with dbo_. Here's some code by John Vinson that should do the trick.

Code:
 Public Sub RenameSQLTables()
Dim db As DAO.Database
Dim tdf As DAO.TableDef
Set db = CurrentDb
For Each tdf In db.TableDefs
If Left(tdf.Name, 4) = "dbo_" Then
    tdf.Name = Mid(tdf.Name, 5)
End If
Next tdf
End Sub
 
Thanks. Actually macros work. Problem was up to some IDs. I made some mistakes during importing data so my query which was data source for subform wasn't updated. Anyway, thanks to both!
 
Glad you got it sorted.
 

Users who are viewing this thread

Back
Top Bottom