Runtime Error 3611

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

runtime error 3611 - cannot execute data definition statements on linked data
sources.

i have a FE & BE

i have the following code as part of my startup code

Public Function AddRegistrationDetails()

DoCmd.RunSQL "ALTER TABLE tblDatabaseInformation ADD COLUMN
[RegistrationDate] DATE;"

End Function

Any ideas on the error message?
 
You will need to OpenDatabase on the back end mdb, and Execute the DDL query
statement on that db.

If Execute is new, see:
Action queries
at:
http://allenbrowne.com/ser-60.html

Instead of:
Set db = dbEngine(0)(0)
you will need:
Set db = OpenDatabase("C:\MyFolder\MyFile.mdb")
and after the MsgBox:
db.Close
 
Many thanks allen

Allen Browne said:
You will need to OpenDatabase on the back end mdb, and Execute the DDL query
statement on that db.

If Execute is new, see:
Action queries
at:
http://allenbrowne.com/ser-60.html

Instead of:
Set db = dbEngine(0)(0)
you will need:
Set db = OpenDatabase("C:\MyFolder\MyFile.mdb")
and after the MsgBox:
db.Close

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

StuJol said:
runtime error 3611 - cannot execute data definition statements on linked
data
sources.

i have a FE & BE

i have the following code as part of my startup code

Public Function AddRegistrationDetails()

DoCmd.RunSQL "ALTER TABLE tblDatabaseInformation ADD COLUMN
[RegistrationDate] DATE;"

End Function

Any ideas on the error message?
 
Back
Top