473,396 Members | 1,804 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,396 software developers and data experts.

Something about combo box

Sorry, i didn't know exactly what to name my question.

What i need is to create a database for storing office items that will include Desktop computers, Laptops, printers, phones, etc. as ItemCategories.

I have a combo box on form to list all ItemCategories and run query by Item Category. Then the query result should show all the items, if say ItemCategory was Desktop computers then items returned by query will be all desktop computers.

On the other hand, i have a combo box for the user to choose ItemCategory when they are adding new items to the database. Other fields for adding new items are "Item make" "Item serial No." and "comment".

The experience i had was that each time i would add new item and choose the ItemCategory from the combo box, upon query the ItemCategory will appear in the combo box as many times as i had added new items. What i want is no matter how many times i choose the ItemCategory for new items the query combo box should only show a single ItemCategory afterward.

I hope my question has some sense. Please, advise. A Sample will be appreciated, too.
May 14 '08 #1
1 1302
Ok from the start you should have a separate table that stores your Item categories and a lookup in your Items table looking at the Items categories table. it's sounds like that is the way you have it setup if not then what your trying to do may not work. from there create a new combo box looking at your Items category table returning the Item category. then in your query for your form put criteria for item category like so Forms!formname!comboname to restrict by category and also paste it in the field section and put an null in the second line of criteria. then all you have to do is requery your form on the afterupdate event of your new combobox.

if for some reason you don't have a category table then you may try this go into the data for your existing combo and open the query put it in SQL view and place he word DISTINCT after SELECT ( SELECT DISTINCT item, item_code bla, bla, bla FROM items WHERE Bla Bla Bla).

hope this helps
May 15 '08 #2

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

Similar topics

3
by: vgrssrtrs | last post by:
<html> <head> <script language="JavaScript"> <!-- /* *** Multiple dynamic combo boxes *** by Mirko Elviro, 9 Mar 2005 *** ***Please do not remove this comment
4
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...
3
by: Karl Roes | last post by:
Hi All, I have a form with a standard combo box and 5 tabs in A2003. On Form Open, I set Me.Detail.Visible = False and in the after update event of the combo set Me.Detail.Visible = True,( to...
7
by: jballard | last post by:
Hello, I have a database set-up with a form and two subforms in it. I have one of the subforms (replacement parts) set-up where you can pick part numbers from a drop down box and also pick a...
3
by: hmiller | last post by:
Hey everyone, I am having a hell of a time trying to set this menu system up. Here's what I'm trying to do. Combo Box One; is populated by names under properties "row source" "Phase 1"...
0
by: Eddie | last post by:
In Microsoft Access form, combo box can be binded to the table or query and can be shown as multi column, getting a actual binded column and showing columns. I'm struggling to make a...
2
by: kiranmn75 | last post by:
I want to dynamically populate a combo box through javascript. Data is coming from a array. Sometimes data list may contain items in excess of 2000. Explorer takes more than 5 seconds to...
6
by: Dave | last post by:
I want to put the information that the user selects in my combo boxes into a subform that lies on the same form as the combo boxes. Thanks for your help already, Dave
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...
0
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,...

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.