473,656 Members | 2,793 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Need some combo advice


I basically have a form with a subform with two combo boxes on the main
form which filter the subform. The code below works except I cant seem
to get it to show all the worksheets when there is nothing in the buyer
combo or status combo. Can someone please advise...thank you.

For ease of naming:

Form X - frm01

Subform - Subf02

Combo Buyer - ByrCombo

Field Buyer - BuyerName

Combo Status - StatusCombo

Field Status - Status

So far the code I have is this:

Private Sub Command19_Click ()

Dim stDocName As String

Dim stLinkCriteria As String

stDocName = "frm02"

If Not IsNull(Me!ByrCo mbo) Then

stLinkCriteria = "[BuyerName]=" & Me!ByrCombo

End If

If IsNull(Me!ByrCo mbo) Then

stLinkCriteria = "[BuyerName]=" & "*" 'Here I am trying to get it to
show all records if its null

End If

If Not IsNull(Me!Statu sCombo) Then

If Len(stLinkCrite ria) <> 0 Then

stLinkCriteria = stLinkCriteria & " AND "

End If

stLinkCriteria = stLinkCriteria & "[Status] = " & Me!StatusCombo

[Child0].Requery

End If

End Sub
--
Posted via http://dbforums.com
Nov 12 '05 #1
1 1765
Try using "[Fieldname] LIKE '" & strValue & "*'" or something along
those lines. Check www.mvps.org/access for this. I know it's there
in the forms section. look for something like Filter + combobox, and
you should find it.
Nov 12 '05 #2

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

Similar topics

4
4272
by: Heather | last post by:
Hi I am desparately looking for advice in relation to storing the results after selecting items from two combo boxes on a Referral form. The first combo box 'ctl Type' displays a full list of Agency Types, then the 2nd combo box displays a list of Organisations, depending upon the Agency Type Selected. The first combo box 'ctlType' (Unbound), Row Source: to field in 'AgencyReferralType'.
2
1224
by: Ray Bell | last post by:
There are 2 tables, a table called parent and a table called child. The parent table has 2 fields, an ID (AUTO Number: PK) and Name (Parent Name) The Child Table has 3 fields, an ID (AUTO Number: PK), ParentID(FK to ID in parent Table) and Name(Childs Name) The tables are related by the ID and ParentID
3
3156
by: ssb | last post by:
Hello, This may be very elementary, but, need help because I am new to access programming. (1) Say, I have a column EMPLOYEE_NAME. How do I fetch (maybe, cursor ?) the values one by one and populate a combo box with these names. (this way, I can display all the EMPLOYEE_NAME values) (2) In general, can I do additional processing on column values from
1
321
by: Gary | last post by:
I am working on this database that has a table ( tbl_main ) with the following 3 fields (amongst many fields in the table): Product, PanelType and Thickness Product (text field - combo box containing values to choose from) The product field has (from the drop down box) the following values to choose from: KS1000 KS1000RW KS900
3
5336
by: Mike Jakes | last post by:
I hope that someone can offer a little advice on this one - I've searched the group but can't find an answer. I think that I'm doing something really stupid or missing something trivial, but see what you can make of this... I have a main form "Events" that contains a tab control. The tab control has 7 pages. The 7th page (named "Boats") contains a subform called "BoatEventssubform". On this sub-form are two combo boxes, named...
0
1594
by: Tom | last post by:
I have some very strange issues with combo boxes on a tab control. Here's the scenario: I have a Windows Forms form that has a tab control on it, with two (2) tabs. Tab 2 happens to have a number of text and combo boxes on it (in panels on the tab). These combos were originally simple drop down lists - i.e. you had to select from the list and couldn't enter anything of your own. At that time everything worked fine. Now, the users...
4
1996
by: jim | last post by:
So I've had my knuckles rapped by a pro who can offer only vauge advice. I need to reduce the size of one of my tables. Here is the scene: I'm trying to track lots of test scores for individual middle school students. I have a student info table using a student ID number as a primary key. The columns in this table are:
2
7044
by: biganthony via AccessMonster.com | last post by:
Hi, I decided to install Office 2003 Service Pack 3 on my home computer to test (in full knowledge that there may be some issues with it). After installation, I have noticed that with a small database I wrote for home, the combo boxes and listboxes no longer display the bound column. For example, on a form I have a combo box based on a table called 'names'. The two columns in the combo box are ID and Surname. The combo box and list box...
10
8501
by: bettyboo | last post by:
Hi all I got some really useful advice from here with my last question so I'm back for more! Only my second post so please bear with me - I'm very new to this so this will probably not be as concise as it could be (I'm having a bit of trouble expressing myself and am not sure what's important to include!). I'm trying to build a database for a driving instructor acquaintance and have a form to enter pupil details, f_Pupils. Each pupil...
0
8382
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
8717
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8600
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7311
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5629
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
4150
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
4300
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1930
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1600
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.