Can somebody help me?
I need to open a remote database and write the number 1987742 in
the field affiliates of the table bank.
To this end i have built the folloiwng function
Public Function UpdateFieldAffiliate()
Dim StrPassword As String
StrPassword = “secret”
Dim db As DAO.Database
Set db = DBEngine.Workspaces(0).OpenDatabase(BEpath,
dbDriverComplete, False, “; PWD=” & StrPassword)
Dim StrVa As String
StrVa = ” UPDATE bank SET affiliates = 1987742″
CurrentDb.Execute StrVa
End Function
However i receive the error in the line CurrentDb.execute StrVa.
It is clear to me that the database is not current but remote, and
hence the error.But how can i rewrite it?