S
Steve
I have upconverted my Access 2003 database backend to SQLExpress 2005. Most
of the functions work with a few minor glitches. The biggest is the fact that
I can not duplicate records anymore. Here is the VBA Code I have been using
with Access backend...
Private Sub Command57_Click()
On Error GoTo Err_Command57_Click
Dim dbs As DAO.Database
Dim rst As DAO.Recordset
Dim f As Form
Set dbs = CurrentDb
Set rst = Me.RecordsetClone
On Error GoTo Err_Command57_Click
Me.Tag = Me![PurorderID]
With rst
.AddNew
!SupplierID = Me!SupplierID
!Address = Me!Address
!City = Me!City
!StateOrProvince = Me!StateOrProvince
!PostalCode = Me!PostalCode
!PhoneNumber = Me!PhoneNumber
!PoDate = Now()
!EmployeeID = intuser
!PoStatus = "creating"
!ShipViaID = Me!ShipViaID
!Payment = Me!Payment
!ShipToName = Me!ShipToName
!ShiptoAddress = Me!ShiptoAddress
!ShipToCity = Me!ShipToCity
!ShipToState = Me!ShipToState
!ShipToZip = Me!ShipToZip
!jobname = Me!jobname
!PoNotes = Me!PoNotes
!Spec = Me!Spec
!InHouseNotes = Me!InHouseNotes
!fsc = 1
..Update
..Move 0, .LastModified
End With
Me.Bookmark = rst.Bookmark
DoCmd.SetWarnings False
DoCmd.OpenQuery "copypoFSC"
DoCmd.SetWarnings True
Me![frmPurchaseOrderDetailFSC].Requery
Exit_Command57_Click:
Exit Sub
Err_Command57_Click:
MsgBox Err.Description
Resume Exit_Command57_Click
End Sub
After the line " !SupplierID = Me!SupplierID" I get an error and message box
that it was unable to update. Any thoughts. The goal is to copy all the
records information but with a different record ID or primary key.
Thanks in advance.
Steve
of the functions work with a few minor glitches. The biggest is the fact that
I can not duplicate records anymore. Here is the VBA Code I have been using
with Access backend...
Private Sub Command57_Click()
On Error GoTo Err_Command57_Click
Dim dbs As DAO.Database
Dim rst As DAO.Recordset
Dim f As Form
Set dbs = CurrentDb
Set rst = Me.RecordsetClone
On Error GoTo Err_Command57_Click
Me.Tag = Me![PurorderID]
With rst
.AddNew
!SupplierID = Me!SupplierID
!Address = Me!Address
!City = Me!City
!StateOrProvince = Me!StateOrProvince
!PostalCode = Me!PostalCode
!PhoneNumber = Me!PhoneNumber
!PoDate = Now()
!EmployeeID = intuser
!PoStatus = "creating"
!ShipViaID = Me!ShipViaID
!Payment = Me!Payment
!ShipToName = Me!ShipToName
!ShiptoAddress = Me!ShiptoAddress
!ShipToCity = Me!ShipToCity
!ShipToState = Me!ShipToState
!ShipToZip = Me!ShipToZip
!jobname = Me!jobname
!PoNotes = Me!PoNotes
!Spec = Me!Spec
!InHouseNotes = Me!InHouseNotes
!fsc = 1
..Update
..Move 0, .LastModified
End With
Me.Bookmark = rst.Bookmark
DoCmd.SetWarnings False
DoCmd.OpenQuery "copypoFSC"
DoCmd.SetWarnings True
Me![frmPurchaseOrderDetailFSC].Requery
Exit_Command57_Click:
Exit Sub
Err_Command57_Click:
MsgBox Err.Description
Resume Exit_Command57_Click
End Sub
After the line " !SupplierID = Me!SupplierID" I get an error and message box
that it was unable to update. Any thoughts. The goal is to copy all the
records information but with a different record ID or primary key.
Thanks in advance.
Steve