A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

searching for records using a form



 
 
Thread Tools Display Modes
  #1  
Old February 1st, 2006, 03:08 AM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default searching for records using a form

Hi there. I'm confused. I want to be able set up a form so that whatever I
select in the combo box, I get the coresponding records. For example, if I
select the "marketing" department in the combo box, I would like to see all
the employees that work in the "marketing" department. I'm getting confused
as to whether the combo box showing the departments should be bound or
unbound?? I don't want to use the form to add records, just to search
through existing records. I am using Access 2000.

Any help is much appreciated,
Zzzzzzaps

--
Message posted via http://www.accessmonster.com
  #2  
Old February 1st, 2006, 03:44 AM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default searching for records using a form

I have tried using the combo box wizard, but I only am able to select one
record at a time. I would like to show all employees that work in a
particular department.

Thanks again
zaps

zaps wrote:
Hi there. I'm confused. I want to be able set up a form so that whatever I
select in the combo box, I get the coresponding records. For example, if I
select the "marketing" department in the combo box, I would like to see all
the employees that work in the "marketing" department. I'm getting confused
as to whether the combo box showing the departments should be bound or
unbound?? I don't want to use the form to add records, just to search
through existing records. I am using Access 2000.

Any help is much appreciated,
Zzzzzzaps


--
Message posted via http://www.accessmonster.com
  #3  
Old February 1st, 2006, 11:36 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default searching for records using a form

On Wed, 01 Feb 2006 03:08:56 GMT, "zaps via AccessMonster.com"
u18278@uwe wrote:

Hi there. I'm confused. I want to be able set up a form so that whatever I
select in the combo box, I get the coresponding records. For example, if I
select the "marketing" department in the combo box, I would like to see all
the employees that work in the "marketing" department. I'm getting confused
as to whether the combo box showing the departments should be bound or
unbound?? I don't want to use the form to add records, just to search
through existing records. I am using Access 2000.


You can set the Form's Filter property in the AfterUpdate event of the
combo box. E.g.

Private Sub cboDepartment_AfterUpdate()
If IsNull(Me!cboDepartment) Then ' clear the filter
Me.Filter = ""
Me.FilterOn = False
Else
Me.Filter = "[DepartmentID] = " & Me.cboDepartment
Me.FilterOn = True
End If
End Sub

Adjust fieldnames and control names to your situation of course.

John W. Vinson[MVP]
 




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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Tell if Form is a Dialog Alex Using Forms 7 August 30th, 2005 06:22 PM
Combo Box NotInList - How To Add Data To Underlying Table 10SNUT Using Forms 19 July 8th, 2005 09:12 PM
ECHO Causing Problems DS General Discussion 5 May 17th, 2005 02:19 AM
Searching Records Melissa Lambino New Users 6 July 20th, 2004 04:51 AM
auto entry into second table after update Tony New Users 13 July 9th, 2004 10:42 PM


All times are GMT +1. The time now is 09:24 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.