Issue with ADP form bound to Stored Procedure

B

Brad Naugle

I have an application that I support that is a Microsoft Access Database Project. It uses Access as a front end to a SQL Server database (SQL Server 2000). The current version of Access used in production is Access 2000 (Office 2000). My application site will be receiving new workstations next week that run Access 2002 (Office 2002/XP). When testing with the new version of Access we discovered an issue with one of the Access forms being bound to a Stored Procedure as its data source. It uses the following code to do this

Me.RecordSource = "dbo.proc_frm_Input
Me.UniqueTable = "dbo.tblRequest
Me.InputParameters = "@lngStartRqstId = " & Forms!frmMainMenu!txbStartRqstId & ", @lngEndRqstId = " & Forms!frmMainMenu!txbEndRqstI

This code will work if the application is ran with Access 2000, but not with Access 2002. It will not retrieve/display any data from the stored procedure with Access 2002. I modified the code above to the following code below

Set rs = New ADODB.Recordse

With r
Set .ActiveConnection = CurrentProject.AccessConnectio
.Source = "dbo.proc_frm_Input @lngStartRqstId = " & Forms!frmMainMenu!txbStartRqstId & ", @lngEndRqstId = " & Forms!frmMainMenu!txbEndRqstI
.LockType = adLockPessimisti
.CursorType = adOpenDynami
.Ope

Set Me.Recordset = r
End Wit

This code will bring back data from the stored procedure and display it in Access 2002, but it creates other issues. One of the issues involves checking some of the check boxes on the data bound form. When a user clicks on the check box it causes a memory exception error and shuts Microsoft Access down after sending an error report to Microsoft. I can update the fields that are associated with text boxes but not the fields associated with check boxes

Any help anyone can provide would be greatly appreciated. Thank you in advance for your time.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top