Web Databases Reports & Queries

jdunca4

Registered User.
Local time
Today, 06:53
Joined
Oct 29, 2013
Messages
16
To any who can help me. I have been converting my database to a web version for sharepoint use. Besides all the issues you get when trying to do this my particular issue is I have some code in my report.

Code:Private Sub Report_Load()
Dim dbs As Database, rst As Recordset

Set dbs = CurrentDb
Set rst = dbs.OpenRecordset("SELECT DISTINCT [Applicable Packet Answer Query Web].WRNumber, [Applicable Packet Answer Query Web].NoOfPoints " _
& "FROM [Applicable Packet Answer Query Web]")

If Not rst.EOF Then
rst.MoveLast
Me.Text26 = rst.RecordCount
End If
End Sub

When I open the report it runs the query associated with it. The query is set up such that the user must enter parameters to retrieve what they want. What is in red above is what the debugger stops at after I get the run time error 3061 "Too few parameters. Expected 7". I do have 7 parameters that can have values if the user wants but the query is set up such that if the user doesn't enter anything it should return all results. For example all of the my seven fields have a criteria of:

Like [What WR?] & "*" or Like IsNull([What WR?])

Without the code above in my report this query runs and returns the results I am looking for but when included it wants a value for every parameter.

Any help is appreciated. Database is attached.
 

Attachments

Users who are viewing this thread

Back
Top Bottom