deanvilar
Registered User.
- Local time
- Today, 11:24
- Joined
- Mar 27, 2013
- Messages
- 63
Hello Gurus,
How to save another data into another database taking the last "moveCode" of another database?
below sample of saving a data in the current DB.
Private Sub cmdSave_Click()
Set db = CurrentDb
Set rst = db.OpenRecordset("fuelMngtTable")
If Me.txtAssetNo = "" Then
MsgBox "Asset Number should not be blank!", vbCritical
Me.txtAssetNo.SetFocus
Else
With rst
.AddNew
!assetCtr = Me.txtAssetCtr
!assetNo = Me.txtAssetNo
!compCode = Me.cmbCompCode
!compCodeDesc = Me.txtCompCodeDesc
!assetDesc = Me.txtAssetDesc
!equipType = Me.cmbEquipType
!model = Me.txtEquipModel
.Update
End With
rst.Close
Set rst = Nothing
Set db = Nothing
'====================
'OPEN DATABASE ASSET MNGT RUNNING COST THEN TAKE THE LAST "moveCode" THEN SAVE ALL DATA ABOVE TO DATABASE ASSET MNGT RUNNING COST
How to save another data into another database taking the last "moveCode" of another database?
below sample of saving a data in the current DB.
Private Sub cmdSave_Click()
Set db = CurrentDb
Set rst = db.OpenRecordset("fuelMngtTable")
If Me.txtAssetNo = "" Then
MsgBox "Asset Number should not be blank!", vbCritical
Me.txtAssetNo.SetFocus
Else
With rst
.AddNew
!assetCtr = Me.txtAssetCtr
!assetNo = Me.txtAssetNo
!compCode = Me.cmbCompCode
!compCodeDesc = Me.txtCompCodeDesc
!assetDesc = Me.txtAssetDesc
!equipType = Me.cmbEquipType
!model = Me.txtEquipModel
.Update
End With
rst.Close
Set rst = Nothing
Set db = Nothing
'====================
'OPEN DATABASE ASSET MNGT RUNNING COST THEN TAKE THE LAST "moveCode" THEN SAVE ALL DATA ABOVE TO DATABASE ASSET MNGT RUNNING COST