Showing posts with label working example. Show all posts
Showing posts with label working example. Show all posts

Tuesday, November 17, 2009

My Treeview Project Episode 7 | Another Way To Read Through Your Data

In Episode 7 of My Treeview Project we're going to look at another approach to reading through our data and adding nodes to the treeview.

Tuesday, September 8, 2009

Treeview Example- Filling Recursively, Populating With Names of Folders

Here's another working Treeview example from the code archive at UtterAccess.

Quote: This little database illustrates the implementation of Microsoft Knowledge Base Article Q20981 (How to Fill a Treeview Control Recursively). In addition, frmFolderExamples illustrates one way to fill the Treeview Control with the names of the folders located on a drive. It also shows how to return some of the properties of the treeview nodes as well as how to clear a treeview. I use some code harvested from Candace Tripp’s Browse and Open Files Database as well as ideas from Luiz Cláudio’s Treeview Control for Database Objects.

Saturday, April 4, 2009

Dymanic Forms: Moving Controls Along With The Tab Control They're Part Of

Lately I've built some really neat forms where the controls are moved based on the size of the form or in response to use input. It's not so hard to change the position of a control and it can make for a really well optimized user interface.

One of the particular challenges when moving controls is keeping the controls on a tab control in their proper place. If you move a tab control the controls on the tabs don't move on their own. A.D. Tejpal recently posted this sample database on Rogers Access Library that demonstrates enumerating the controls on each page of the tab control and moving them all so that they all stay together and stay in the right place on the tab control.

Friday, April 3, 2009

Access 2007 Sample Database Demomstrating Cascading Combo Boxes

"I have two combo boxes on my form. When the user makes a choice in one I want the choices in the other on to change. For example the user will pick a country in the first combo box and the second combo box will now show only cities in that country. How do I do that?"

That's commonly called Cascading Combo Boxes and is one of the most commonly asked about techniques. I ran across a new article on this topic the other day. This a blog post from the Microsoft Access team that points out two different ways to get an Access 2007 sample database that demonstrates and explains two simple approaches to cascading combo boxes.

See also: all my Cascading Combo Box posts.

Tuesday, March 17, 2009

My Treeview Project | Episode 6: Images for the Nodes

This (at long last) is Episode 6 of My Treeview Project.

  • In Episode 1 we started with the "Hello World" treeview
  • In Episode 2 we built a treeview that showed some simple data from the Northwind Traders sample data
  • In Episode 3 we learned how to change the appearance of the treeview
  • In Episode 4 we added Expand All and Collapse All buttons that interact with the treeview
  • And in Epsiode 5 we finally got the treeview to do something useful- we used it to select records to view and edit.

Here's this episode's treeview:

Download the finished database
In Episode 6 you'll see two things. The main focus of the episode is the use of images for the nodes in the treeview. As well, I'll demonstrate a different approach to the code that reads records from the tables and creates the nodes.

Unbound Form With Undo and Redo

Access is great at forms that are bound to tables in data. But sometimes there's value in creating an "unbound form". The data is stored in the controls on the form and your code saves it to the table (or tables) when the user clicks the save button. You might do this when the structure of your data is not ideal for your form- a survey database for example.

This post provides a working example of an unbound form complete with undo and redo buttons.

Monday, March 16, 2009

Access TreeView-ListView Basics from Database Journal

Here's a treeview article I haven't run across before: Access TreeView-ListView Basics from Database Journal walks the reader through creation of a form with a treeview and a listview.

It doesn't have a detailed explanation of how it works, but it does include a downloadable working example, and the zip file for the example includes the elusive help file that covers the treeview and listview controls- very handy! The code uses the "one pass" approach to loading the treeview- a single query is used that brings in all books, and whenever a new bookstore is encountered that node is added.

Monday, October 13, 2008

Sample Access Databases From Office Online

I find that looking at a demonstration or sample database is a great way to learn more about Access. Microsoft has some great samples databases here on Micorsoft Office Online. that demonstrate some really neat techniques for forms, reports, and queries.

Sunday, October 12, 2008

Appointment Calendar From the UtterAccess Code Archive

A lot of questions a posted on discussion boards about building forms with embedded calendars. Some are just to select a date, some are to show information on a calendar. This post in the code archive at UtterAccess.com is a neat working example of an appointment calendar, with both a monthly view showing all appointments in a month and a daily view showing appointments in time slots. All accomplished without ActiveX controls!
See all my calendar form posts.

Sunday, September 14, 2008

My Treeview Project | Episode Five: Using The Treeview To Select Records to View/Edit

In episode 5 we'll make the treeview really do domething. We'll use it to select records from the products and categories tables that we want to see or edit. The work you'll have to do in this episode is a little more than in the last two, but we'll go through it step-by-step. We're building on the work you've done in previous episodes.

Wednesday, February 13, 2008

A Working Treeview Example with Drag and Drop

Here's another working treeview sample from UtterAccess.com. This one's pretty sophisticated, with a drag and drop function used to change who staff report to and another to drag unassigned orders from a listview into the treeview where you drop them on the staff that will work on them. A nice implementation indeed.
The author, Brent Spaulding, is one the the treeview experts at UtterAccess.
See also: other treeview posts on my blog.

Monday, February 11, 2008

Using a TreeView Control as a Record Selector

Treeview continues to be one of the most common of the search keywords that bring folk to MyMSAccessBlog. I love developing with treeviews and if I can narrow down the specific questions folk are searching for answers to I'll post some detailed tips or solutions. For now, here's here's a zip file from Helen Feddema's Access Archon page with a working example:

The example uses a treeview to select books or authors to display information about.
Quote:
A TreeView control makes a better record selector than the standard combo box for situations where you are working with hierarchical data, and want to allow selection of an item from a branch of the data hierarchy.

For all my treeview posts click here.

Tuesday, January 8, 2008

Working Treeview Example

Treeviews are one of my favourite user interface components to develop with. But judging by the questions on the discussion forums, a lot of folk have trouble getting started with them. Here's a simple working example from the code archive at www.UtterAccess.com.

See more treeview posts on my blog.