Hi,
Below is a module from the access help file :
Sub InsertIntoX2()
Dim dbs As Database
' Modify this line to include the path to Northwind
' on your computer.
Set dbs = OpenDatabase("Northwind.mdb")
' Create a new record in the Employees table. The
' first name is Harry, the last name is Washington,
' and the job title is Trainee.
dbs.Execute " INSERT INTO Employees " _
& "(FirstName,LastName, Title) VALUES " _
& "('Harry', 'Washington', 'Trainee');"
dbs.Close
End Sub
The trouble is I have tried this and it does not seem to work. I have tried with the database both open and closed, and no luck. Am i correct that this should be inserted as a module?
Cheers
Jay
Below is a module from the access help file :
Sub InsertIntoX2()
Dim dbs As Database
' Modify this line to include the path to Northwind
' on your computer.
Set dbs = OpenDatabase("Northwind.mdb")
' Create a new record in the Employees table. The
' first name is Harry, the last name is Washington,
' and the job title is Trainee.
dbs.Execute " INSERT INTO Employees " _
& "(FirstName,LastName, Title) VALUES " _
& "('Harry', 'Washington', 'Trainee');"
dbs.Close
End Sub
The trouble is I have tried this and it does not seem to work. I have tried with the database both open and closed, and no luck. Am i correct that this should be inserted as a module?
Cheers
Jay