[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.1

Using Auto Filtering and Enabling Checkbox Selection on Unbound Datasheet SubForms w/ SQL Server Backend

Asked by n1ckjp in Microsoft Access Database, Access Coding/Macros, MS SQL Server

Tags: Access 2007, SQL Server 2008

As you can see from the Title I'm trying to have my cake and eat it too.

I'm building a database in which there are two particular types of forms that I can see coming up over and over again and I'm trying to find a satisfactory way to use as much of the built-in access functionality while still maintaining a bit of flexibility and performance.

Currently I am using an Access 2007 accdb file backing onto a single SQL Server Express 2008 instance. I contemplated using an ADP and haven't completely thrown away the idea, but would need a fairly compelling reason to do so at this stage. (My initial experimentation seemed to indicate that Access 2007 doesn't yet have much in the way of SQLSrv2008 support which made me a bit leery)

The database is intended to track progress on work items and (among other things) provide an interface for supervisors to allocate said workitems to employees. The Work items have a fairly large number of attributes (columnns) which will need to be used to sort/filter the information.

I am quite new to SQL Server but have recently created a couple of views/stored procs/inline table-val functions to deal with much of the querying and am now reasonably confident working around the ADO library.

Unfortunately, I have discovered that binding ADO recordsets (during the form load procedure) to a Datasheet Form seems to disable all the built in Filter, Sort and Refresh functionality. I typically see a lot of "Data provider could not be initialized" type errors.

In some other scenarios I know I have managed to get the column header filters to work, but they are not populated with 'Lists of Values' for want of a correct term.

As a side note I have switched on the "Show List of Values in ODBC Fields" option

The two common forms I'm trying to build are:

1. A basic subform datasheet, that is 'linked' to its parent at the query level (rather than using a filter which seems to be a common method of handling this)

2 A subform in which numerous selections can be performed, the data sorted filtered, etc before performing an action on the selected list of rows.  

As a nice bonus it'd be good if I could use stored procedures to populate these forms as well, although that might be a bit of a stretch.

For Form type 1 I currently have in the On_load method of the parent form something like this:

Me.RecordSource = "SELECT * FROM uvw_PitemAllCategories WHERE PItemID =" & Me.OpenArgs
Me.chdAssign.Form.RecordSource = "SELECT * FROM uvw_Emp_Assignments WHERE PItemID=" & Me.OpenArgs

Which seems to work reasonably well, however I'd prefer to pass the select statement straight through to the SQL server since the two views (prefixed uvw_)  are likely to grow quite large over time and I don't want the whole thing being batted back and forth over the network.

For Form Type 2 I currently have gone down the path of designing a pile of custom classes built around an MSComctlLib.ListView control which I populate manually, however I'm not going to be able to come close to achieving the functionality of a basic Access datasheet in the timeframe required so am looking elsewhere.

One thought I'd had was to use the "Simple Select" method demonstrated by Leigh Purvis on his website ( http://www.databasedevelopment.co.uk/examples/ListSelect.zip ) (Great examples by the way Leigh. Incredibly helpful) but unfortunately my 'category table' is a non-updateable view which prevents me from selecting the checkboxes.

So anyway, I'm a bit stuck on where to go next and am worried about coding myself into a dead-end. 200 points for whoever can help me sort out Form problem 1 and 300 for Form problem 2. (and my undying gratitude)

Any general help or commentary on my design greatly appreciated.
[+][-]10/16/09 03:45 AM, ID: 25588248Assisted Solution

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 30-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]10/16/09 06:30 AM, ID: 25589304Assisted Solution

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 30-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]10/18/09 03:15 AM, ID: 25599338Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10/18/09 05:27 AM, ID: 25599602Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zones: Microsoft Access Database, Access Coding/Macros, MS SQL Server
Tags: Access 2007, SQL Server 2008
Sign Up Now!
Solution Provided By: LPurvis
Participating Experts: 2
Solution Grade: A
 
[+][-]10/18/09 07:38 PM, ID: 25602344Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10/18/09 07:39 PM, ID: 25602349Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091021-EE-VQP-81 - Hierarchy / EE_QW_3_20080625