To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here
VBForums  

VB Wire News
Part 10 of the Visual Basic .NET 2010 Express Tutorial Complete!
How to Use the Visual Studio Code Analysis Tool FxCop
Article :: Interview with Andrei Alexandrescu (Part 3 of 3)
Introducing Visual Studio LightSwitch
Visual Studio LightSwitch Beta 1 is Available



Go Back   VBForums > Visual Basic > Office Development

Reply Post New Thread
 
Thread Tools Display Modes
Old Dec 7th, 2006, 01:27 PM   #1
Shodan
Junior Member
 
Join Date: Oct 06
Posts: 27
Shodan is an unknown quantity at this point (<10)
Resolved [RESOLVED] sorting / filtering a subform

Hello everyone,
I know this is a simple question. I've don't work with forms and subforms that much but I know this can be done.

Thanks for answering my newbie question.

I have a form "frmResults" that just has a header with a picture and a label.

Attached to it is a subform "subfrmResults" which has a table as the record souce. I basiclly highlighted the table "tblData" and clicked on insert form from the menu item and made it a datasheet form. then I went into the design of "frmResults" and added the "subfrmResults" as a subform.

Now I want to add command buttons in the header of "frmResults" that will sort or "order by", the subform depending on which column the user wants to sort.

I also want to give them the ability to fiter by insurance type or date range when clicking on a button I would pull up an input box so they can type in the date range or insurance type.

For example. The subform's source table and the columns showing on the form are "Insured", "Insurer", "Policy Number", "Start Date", "End Date" and "Insurance Type"

So I will have buttons named as the column headings and when the user clicks on that the subform should refresh the data in the correct sorted order and the lable on the main form "frmResults" should display "Sorted by: " & button clicked.

right now I have this working with a startup form that has the button's on it and when clicked it closes and open the frmResults which has it's record source set to a select query that I created in code. It works fine but the user wants to be able to make changes to the database so I thought instead of having the database table a linked table and using a query to populate the subform I would just import the database into a table and build a form on it and add it as a subform to the main form, create by sorting and filtering buttons and do away with the startup form.

does this make sense??

Shodan
Shodan is offline   Reply With Quote
Reply

Go Back   VBForums > Visual Basic > Office Development


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 05:22 AM.





Acceptable Use Policy

Internet.com
The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.