I have upsized by current database to SQL Server. Everything is working great except one thing. I have a form listed all the job that have been shipped but not invoiced. The form has a listbox (multi-select "simple"
and a command button. The user can select multiple job anc click the command button to change to status of the job to invoiced. My code works fine in Jet but not with SQL Server. What's the problem? Here's my code:<br><br>Private Sub CmdInvoice_Click()<br>Dim db As Database, rst As Recordset<br>Dim varNumber As Variant<br><br>If Me.lstJobsNotInvoiced.ItemsSelected.Count = 0 Then<br> MsgBox "You must select at least one job to update.", vbOKOnly + vbInformation, "No Jobs Selected"<br> End If<br>Set db = CurrentDb<br>Set rst = db.OpenRecordset("tblJobs", dbOpenTable)<br><br>'Set Loop<br><br>For Each varNumber In Me.lstJobsNotInvoiced.ItemsSelected<br>rst.Seek "=", lstJobsNotInvoiced.ItemData(varNumber)<br>rst.Edit<br>rst!strInvoiced = -1<br>rst.Update<br>Next<br>Me.lstJobsNotInvoiced.Requery<br><br>End Sub<br><br>I'm getting the error "invalid operation" on the following line of code:<br>Set rst = db.OpenRecordset("tblJobs", dbOpenTable)<br><br>Please can someone help????????<br>Thanks to all