|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#1
|
|||
|
|||
|
I am reasonably new to writing VB Code managing uptil now to get by on wizards and queries. Please help:
I am trying to programme an on click event from a command button to recognise when a record held within a table is ready for archiving. Unfortunately I cannot get it to do anything, any advice would be welcome before I take the long walk out of the window? Private Sub cmdArchive_Recs_Click() On Error GoTo trappingRoutine Dim db As Database Dim rs As Recordset Dim x As Variant Set db = OpenDatabase("I:\WORD\LWM\Briefcase\Database\WIP.mdb") Set rs = db.OpenRecordset("select * from tblAction where [lblArchiveFlag]=-1") x = rs.RecordCount MsgBox (x) Exit Sub trappingRoutine: Call modLorisMods.inLineTrapper(err.Number, err.Description) eam. Lori:< ![]() |
|
#2
|
|||
|
|||
|
Quote:
What is the eam.? Turn off error trapping and see if you get an error message in the DB code. If this code is VBA code within Access 2000 or higher, make sure you have a reference to DAO. |
|
#3
|
|||
|
|||
|
Thank you for your assistance. With reference to eam. your guess is as good as mine, it is not in the code, don't know how it got there. Yes as writing in Access 2000 and am getting a run-time error (13) Type Mismatch???
Didn't think you had to clarify a type as I am referring to a table within the current database. |
![]() |
| Viewing: ASP Free Forums > Programming > Visual Basic Programming > VB Code to Archive Data via Command Button from one Table to another |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
![]() |
|