Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Front-end db has an error. Run-time error 3219. Invalid operation. 1

Status
Not open for further replies.

maupiti

Programmer
Oct 27, 2003
240
US
Access 2003

I have a database where all of the tables, forms, reports, and queries reside in one dayabase called abc.mdb. When I open form Test it works. The code in form Test is shown below.

I have another database that is identical to the abc.mdb database, except that the all of the tables are on the back-end, while the forms, reports and queries resides on the front end. The back end is on the network drive and the front end is on the desktop. The network drive can be written to, and there is no VBA code differences on the two Test form.

When I open the Test form on the front end database, it gave me an error message.

Run-time error 3219. Invalid operation.

The error is flagged at the code below.
Set Recordset_Meter_Table = dbs.OpenRecordset("Meter", dbOpenTable)


/////////////////////////////////////

Run-time error 3219. Invalid operation.

/////////////////////////////////////

Private Sub Form_Load()
Dim dbs As Database
Dim Recordset_Meter_Query As DAO.Recordset
Dim Recordset_Meter_Table As DAO.Recordset
Dim Number_Of_Records As Integer

Set dbs = CurrentDb

Set Recordset_Meter_Table = dbs.OpenRecordset("Meter", dbOpenTable)
Set Recordset_Meter_Query = Me.Recordset
Number_Of_Records = Recordset_Meter_Query.RecordCount
If Number_Of_Records = 0 Then
Recordset_Meter_Table.addnew
Recordset_Meter_Table!SONumber = Public_SO_Number
Recordset_Meter_Table!ItemNumber = Public_Item_Number
Recordset_Meter_Table.Update
Me.Requery
End If
End Sub
 
Have you tried dbOpenDynaset instead of dbOpenTable ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Hi PHV. Thank you very much for your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top