473,394 Members | 1,724 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Filter values of a Listbox

Access 2000, regarding forms.

I want a command BUTTON labeled "server" on a MAINFORM that:
> Opens up a INVENTORY form-which contains a list box- and
> Filter the values in the LIST BOX (for ex. shows only a list of server pcs and not entire inventory)

Once working I would add other buttons on MAINFORM which would open up INVENTORY form and filter based on other values.

Is this possible? let me know, Thanks
Jul 17 '07 #1
3 1985
abolos
65
Access 2000, regarding forms.

I want a command BUTTON labeled "server" on a MAINFORM that:
> Opens up a INVENTORY form-which contains a list box- and
> Filter the values in the LIST BOX (for ex. shows only a list of server pcs and not entire inventory)

Once working I would add other buttons on MAINFORM which would open up INVENTORY form and filter based on other values.

Is this possible? let me know, Thanks

You may use:
SELECT [tblNameAge].[stname] FROM tblNameAge WHERE stAge=18;
Jul 17 '07 #2
You may use:
SELECT [tblNameAge].[stname] FROM tblNameAge WHERE stAge=18;

Not sure where I should put that code. Here is what I have, Not using a listbox:
Private Sub SwitchorRaritan_Click()
On Error GoTo Err_SwitchorRaritan_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "deviceselectionZ"

stLinkCriteria = [Category]='switch'or [Category]='raritan' "
DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_SwitchorRaritan_Click:
Exit Sub

Err_SwitchorRaritan_Click:
MsgBox Err.Description
Resume Exit_SwitchorRaritan_Click

End Sub
Jul 17 '07 #3
abolos
65
Not sure where I should put that code. Here is what I have, Not using a listbox:
Private Sub SwitchorRaritan_Click()
On Error GoTo Err_SwitchorRaritan_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "deviceselectionZ"

stLinkCriteria = [Category]='switch'or [Category]='raritan' "
DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_SwitchorRaritan_Click:
Exit Sub

Err_SwitchorRaritan_Click:
MsgBox Err.Description
Resume Exit_SwitchorRaritan_Click

End Sub

You have to put it in a query in the SQL view.
Jul 26 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: arthur-e | last post by:
I can filter a query for a report on a field of a subform BUT now.... I'd like to be able to select more than one item in a multi-list box to select all the records. ALSO to use two fields (or...
3
by: RRT | last post by:
I have an existing table which describes Streets and sections of streets between intersections: Table 1: Streets by Intersections Street Area Ann St. Main to Jackson...
2
by: Art | last post by:
Hi (again), I'm populating a ListBox from a DataTable. Is there a way to have the ListBox only display certain values from the DataTable? I'm using the DataTable as the DataSource for the...
5
by: jamesnkk | last post by:
I have a listbox which show customer Names on the 1st column and PO numbers on the 2nd column. When user select the customer and press the OK button, it will access to the PO form. Problem here...
2
by: bobdydd | last post by:
Hi All Access 2007 I have a form with a ListBox called "ListContactTasks" DoubleClicking the ListBox opens another form called "frmContact" at a particular record corresponding to the one in...
1
by: Joelle | last post by:
Hi everyone, i am really stack!i need help I have this report:"RequirementObjects_Report",i have also a multiselect listbox whicg contains a list of products.what i want to do is to filter the...
2
by: lhsiber | last post by:
I am new to access and am having a problem with filtering. Here is a little bit of my setup: I have a main form that has a listbox so that users can choose one or many groups in which to display...
3
by: igglepiggle | last post by:
I have developed a form that runs a folder browser dialog and then details all filenames within the chosen folder in a listbox. Currently the filenames populate a 1-D array before they are written...
9
GazMathias
by: GazMathias | last post by:
Hi Guys, Acc2003. I have a form that is misbehaving by suddenly refusing to apply a filter I am passing to it. In a nutshell, I use a public variable to control the form's behaviour called...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.