W
Waterman
I recently migrated the tables from an Access database to
SQL Server, and still use Access as the front end. What
I am discovering is that not all of my VBA works now.
For instance, the following routine gets hung
on ".Update".
Sub UpdateThis ()
Dim dbs As Database, rst As Recordset
Set dbs = CurrentDb
Set rst = dbs.OpenRecordset("tblTransactions",
dbOpenDynaset)
With rst
.AddNew
!CallID = Me![call number]
!MemberID = Me![MemID]
!MemberLastName = Me![LastName]
!MemberFirstName = Me![FirstName]
!MemberDepCode = Me![DepCode]
!TransReason = Me![CallReason]
!Notes = Me![Notes]
!HandledBy = Me![Handled By]
!DateReceived = Me![Date Received]
.Update
[Forms]![frmCallEntry]![subfrmEntry].Requery
Me![MemID] = Null
Me![LastName] = Null
Me![FirstName] = Null
Me![DepCode] = Null
Me![CallReason] = Null
Me![Notes] = Null
Me![MemID].SetFocus
End With
rst.Close
End Sub
Is it because ".Update" only works for Access and not SQL
Server?
SQL Server, and still use Access as the front end. What
I am discovering is that not all of my VBA works now.
For instance, the following routine gets hung
on ".Update".
Sub UpdateThis ()
Dim dbs As Database, rst As Recordset
Set dbs = CurrentDb
Set rst = dbs.OpenRecordset("tblTransactions",
dbOpenDynaset)
With rst
.AddNew
!CallID = Me![call number]
!MemberID = Me![MemID]
!MemberLastName = Me![LastName]
!MemberFirstName = Me![FirstName]
!MemberDepCode = Me![DepCode]
!TransReason = Me![CallReason]
!Notes = Me![Notes]
!HandledBy = Me![Handled By]
!DateReceived = Me![Date Received]
.Update
[Forms]![frmCallEntry]![subfrmEntry].Requery
Me![MemID] = Null
Me![LastName] = Null
Me![FirstName] = Null
Me![DepCode] = Null
Me![CallReason] = Null
Me![Notes] = Null
Me![MemID].SetFocus
End With
rst.Close
End Sub
Is it because ".Update" only works for Access and not SQL
Server?