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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

BackEnd Error dbSeeChanges Help!

Status
Not open for further replies.

fastEddied

Programmer
Nov 7, 2006
5
US

After upsizing my Data base to SQL in one of my form fields I got an error #3421 you must use the dbSeeChanges option with OpenRecordSet when access a SQL server table that has an Identity Column.

So i thought that's easy enough, little did I know it would prompt another Compile error: Expected Array!
Which I don't know enough about VB to correct or is there something i am not doing with the dbSeeChanges Option
Here is my code: can someone help solve the mystery!
Thanks Fasteddied
Dim lngClear As Long

lngClear = 6
If checkRecordSaved = False And (OperatorText <> "" Or cmbSta1Tech <> "N/A") Then
lngClear = MsgBox("This record has not been saved. Do you want to continue?", vbYesNo)
End If
Select Case lngClear
Case 6

Reset_Fields
SOListBox.Requery

'strSQL = "SELECT * FROM ShopOrder " & "WHERE ShopOrder = '" & _
' Get_ShopOrder & "'"


strSQL = "SELECT * FROM tbl_SchedTopQuery_for_SOListBox " & "WHERE Order_No = '" & _
Get_ShopOrder & "'"

Set rs = Application.CurrentDb.OpenRecordset(strSQL)

varSO = rs!Order_No
strSO = rs!Order_No
strCheckInProc = "SELECT * FROM TesterLog where ShopOrder = '" & strSO & "' AND In_Process_Flag = True"
Set rsCheck = Application.CurrentDb.OpenRecordset(dbSeeChanges(strCheckInProc))
Set_SO = strSO
Show_ShopOrder rs, rsCheck, strSO, False

rs.Close
rsCheck.Close
Set rs = Nothing
Set rsCheck = Nothing

Case Else
Exit Sub
End Select
 
Perhaps something like this ?
Set rsCheck = Application.CurrentDb.OpenRecordset(strCheckInProc, dbOpenDynaset, dbSeeChanges)

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Thanks PHV
That did the trick!
my day has been made
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top