Hi - I'm by no means a programmer but have fudged together a reasonably good DB. Last week it got corrupted and I followed a thread to decompile it which worked (on the whole). While the DB now works I don't think the debug completed as it throws out an error message "Wrong number of arguments or invalid property assignment" and highlights the code element below in red. Can anyone tell me what is wrong with this? I didn't even generate it - it is auto generated from one of the wizards?
The problem I have is code after this element doesn't function properly - when I delete this segment the whole DB runs fine (apart from the bit I deleted). I'm hoping if I can fix this bit then all of it will run smoothly.
Private Sub Command39_Click()
On Error GoTo Err_Command39_Click
Dim stDocName As String
Dim stLinkCriteria As String
DoCmd.SetWarnings False
stDocName = "qryUpdatetask3"
DoCmd.OpenQuery stDocName, , , stLinkCriteria
Exit_Command39_Click:
Exit Sub
Err_Command39_Click:
MsgBox Err.Description
Resume Exit_Command39_Click
End Sub