crown2005
asked on
how to insert a record into table in unbound form
Hi everybody,
Thanks for every one who will try to help me.
Before I explain my problem, I should mention that I use stand alone Pc with MS Access 2002 without any other DB's ( Only MS access Tables ).
I have a small project that controls some office material issues to employees.
One of the form of that project includes 2 unbounds table. It excepts information about an employee and issues. The program saves data to an issues Table.
When I wrote the following module to insert data into the table and save it, I got the following Err message. " User-defined type not defined "
The code I wrote is :
Private Sub Save_Issue_record()
Dim rst As DAO.Recordset ' The Err message points here
Dim dbs As Database
Dim strSQL As String
strSQL = "Select * from issues;"
Set dbs = CurrentDb
Set rst = dbs.openrecordset(strSQL)
With rst
.AddNew
![employee_no] = Me!employee_no
![item_no] = Me!item_no
……….
'[last-Field] = Last-Field value
.Update
End With
rst.Close
dbs.Close
End Sub
Thanks for every one who will try to help me.
Before I explain my problem, I should mention that I use stand alone Pc with MS Access 2002 without any other DB's ( Only MS access Tables ).
I have a small project that controls some office material issues to employees.
One of the form of that project includes 2 unbounds table. It excepts information about an employee and issues. The program saves data to an issues Table.
When I wrote the following module to insert data into the table and save it, I got the following Err message. " User-defined type not defined "
The code I wrote is :
Private Sub Save_Issue_record()
Dim rst As DAO.Recordset ' The Err message points here
Dim dbs As Database
Dim strSQL As String
strSQL = "Select * from issues;"
Set dbs = CurrentDb
Set rst = dbs.openrecordset(strSQL)
With rst
.AddNew
![employee_no] = Me!employee_no
![item_no] = Me!item_no
……….
'[last-Field] = Last-Field value
.Update
End With
rst.Close
dbs.Close
End Sub
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.