473,790 Members | 3,185 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Help with Combo box menu item

Hi
I am trying to use a unbound combo box on a menu form to open another Form
and filter records according to the combo box selection and failing

miserably!

I am using the following - this opens the form but does not apply the

filter.
Private Sub Cbosearch_After Update()

If IsNull(Me.Cbose arch) Then

Me.FilterOn = False

Else

Me.Filter = "[partype] = " & Me!Cbosearch

Me.FilterOn = True

DoCmd.OpenForm "frmresisto r"

End If

End Sub

How to I get the above to apply the filter and just display the

records I selected.

Any help would be very much appreciated.

Dave
Nov 13 '05 #1
2 1764
"Midiman69 @hotmail.com>" <midiman69<NOSP AM> wrote in message
news:d4******** ***********@new s.demon.co.uk.. .
Hi
I am trying to use a unbound combo box on a menu form to open another Form and
filter records according to the combo box selection and failing

miserably!

I am using the following - this opens the form but does not apply the

filter.
Private Sub Cbosearch_After Update()

If IsNull(Me.Cbose arch) Then

Me.FilterOn = False

Else

Me.Filter = "[partype] = " & Me!Cbosearch

Me.FilterOn = True

DoCmd.OpenForm "frmresisto r"

End If

End Sub

How to I get the above to apply the filter and just display the

records I selected.

Any help would be very much appreciated.


Your manipulating the filter of the menu form. That accomplishes nothing for
the form you intend to open. The OpenForm method includes an argument for
applying a filter to the form being opened. That is what you need to use.

DoCmd.OpenForm "frmresistor",, ,"[partype] = " & Me!Cbosearch

(double check help for the number of commas)

--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
Nov 13 '05 #2
Hi

Many thanks for the reply.

When I use you code DoCmd.OpenForm "frmresistor",, ,"[partype] = " &
Me!Cbosearch
a dialogue box "Enter Parameter Value" is displayed. If I enter the
parameter the form opens filtered, if not it just displays the un filtered
form.
If possible, coule you suggest were I am going wrong, and how I can apply
the filter directly from the combo box.
Thanks again

Dave

"Rick Brandt" <ri*********@ho tmail.com> wrote in message
news:U%******** *****@newssvr11 .news.prodigy.c om...
"Midiman69 @hotmail.com>" <midiman69<NOSP AM> wrote in message
news:d4******** ***********@new s.demon.co.uk.. .
Hi
I am trying to use a unbound combo box on a menu form to open another
Form and filter records according to the combo box selection and failing

miserably!

I am using the following - this opens the form but does not apply the

filter.
Private Sub Cbosearch_After Update()

If IsNull(Me.Cbose arch) Then

Me.FilterOn = False

Else

Me.Filter = "[partype] = " & Me!Cbosearch

Me.FilterOn = True

DoCmd.OpenForm "frmresisto r"

End If

End Sub

How to I get the above to apply the filter and just display the

records I selected.

Any help would be very much appreciated.


Your manipulating the filter of the menu form. That accomplishes nothing
for the form you intend to open. The OpenForm method includes an argument
for applying a filter to the form being opened. That is what you need to
use.

DoCmd.OpenForm "frmresistor",, ,"[partype] = " & Me!Cbosearch

(double check help for the number of commas)

--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com

Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
12503
by: Arlie Rahn | last post by:
Does anyone know of a way (using win32s perhaps) to eliminate that focus rectangle over the selected option you see in a normal VB combo box?
4
5780
by: Yuk Cheng | last post by:
<<<start index.htm>>> <html> <head> <script> function perform(action){ } </script> </head>
2
3899
by: Jackson Yap | last post by:
can someone kind enough to help me look at the attached html and js file? Why is it that the javascript menu could not work at www.apchosting.net but could work at http://home.pacific.net.sg/~jacksony ? (the drop down bar could not work at www.apchosting.net but can drop at home.pacific.net.sg. I suspect it is a server problem but was told it is not possible, therefore assuming it is a client script problem? the script works last time...
5
17217
by: Harry Haller | last post by:
<select name="cboPlaces" id="cboPlaces"> <option value="3">Countryside</option> <option value="4">Forest</option> <option value="5">Mountain</option> <option value="6">Desert</option> <option value="7">Jungle</option> <option value="7">Swamp</option> <option value="8">River</option> <option value="12">Town</option> <option value="9">Sea</option>
5
2202
by: Steve Patrick | last post by:
Hi All You guys are my last hope, despite spending money on books and hours reading them I still can not achieve the results I need. I have designed a database in Access 2000 based on 1 table, all has gone very well with one exception. The table is based on applications made by potential customers looking to buy franchise rights to particular locations and as part of the process they are asked to list their preferred locations 1 to 4....
15
2976
by: sara | last post by:
Hi I'm pretty new to Access here (using Access 2000), and appreciate the help and instruction. I gave myself 2.5 hours to research online and help and try to get this one, and I am not getting it. Simple database: I want to have a user enter Supply Orders (just for tracking purposes) by Item. The user may also enter a new item - "new" is a combination of Item, PartNumber and Vendor - they could have the
1
2470
by: gabble | last post by:
Hi all, I'm trying to implement right-click functionality on the drop-down portion of a combo box. I want to show a context menu when the user right-clicks on an item in the dropdown list - I currently have this working, but as soon as the menu appears the dropdown portion of the combo box disappears. I would like this to remain visible behind the context menu. I have handled the cbn_closeup event, but it appears as if this event
17
14829
by: Aussie Rules | last post by:
Hi, I want to have a single line combo box dropdown, but where i can selected multiple items in the drop down via a check box... I can see one in the standard tool box... is there one ? If not any suggestions as to where to get one from.
4
4152
by: Bob Homes | last post by:
In VB6, I used a system, which I loved, whereby I assigned a "helpId" to each menu item; that way, you could rest the cursor on the item (without actually running it) and then press F1 to get context help with that particular command. In VB6 this was easy, since each menu item had a "helpId" property. That doesn't seem to be the case in VB.NET. Am I wrong about that, or (alternatively) is there some other way to accomplish this? --
0
9666
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10419
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10147
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7531
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6770
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5424
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5552
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3709
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2910
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.