473,624 Members | 2,216 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Synchronized Combo Boxes - Maintaining combo box values in a datasheet form

1 New Member
I have an access database to manage inventory we receive. We receive many similar products from different suppliers. I have a form set up database style to receive the different products including the categories of "Supplier" and "Product". I currently have the ROWSOURCE of the Product to be limited to suppliers that match the supplier selected on the form. It works just fine. However, as I move to the next record and put in a new supplier, the previous record's product goes blank (obviously be I changed the supplier value). Is there a way fix this?
May 13 '14 #1
1 1126
zmbd
5,501 Recognized Expert Moderator Expert
kassondrajane
You really haven't provided us with enough detail of your database design to really help.

I can make some guesses based on past experience and similar issues from other members.

First thing to do:
Check that the control size is actually large enough to show the value of the field(s)

The next easiest, shut down everything and COLDBOOT the PC. If this is merely a display issue this will often fix things.

However,
Usually this has to do with how your CONTROL SOURCE and ROW SOURCE properties are setup - these two, although related, are vastly different in their usage.

I think first you should read thru:
> Database Normalization and Table Structures.

DO you have more than one table?
If not, you're most likely not normalized and a normalized database will make setting up the combo/list-box a breeze!

So, how I would do this in my DB, a quick outline follows:

1) In all of my tables, I use the autonumber datatype as my primary key (PK) within the table. It is usually best practice to never use a PK that has any meaning. I also do not rely on the autonumber to give me sequential (serial numbers or check numbers) results - I have a function for that.

tbl_suppliers
This is the table that has nothing except the supplier specific information... think address book.
I even go so far in my database to split out the supplier contact from this table as the sales rep will be promoted, transferred etc... I do not put the products here.

tbl_products
This table has the product details, think of it as an address book for the product. So name, part/catalog number, etc...
it also has a foreign key (FK) that relates the product to the supplier
([tbl_suppliers]![PK] - 1 : M - [tbl_products]![FK_Suppliers])

And so forth... as I mentioned pulling my supplier contact out into their own table... you can do the same with your products table, say colours, fragrance, fabrics... the list is endless. The idea is that it takes less space to store numbers than text and searching on a number is faster.

So now for the inventory.
IF you are tracking serial numbered items then you have an entry for each actual asset (6 items, 6 records) because you need to track the serial numbers Otherwise this can be a very simple table that simply has the product, and the on hand count:
tbl_inventory
([tbl_products]![PK] - 1 : M - [tbl_inventory]![FK_Products])
you might also keep the pricing information here, the products table, or indeed a separate table just depends on your particular needs.

tbl_invoice
depending on your design, this would be related to either the inventory table (due to serial numbers) or to the product table and ideally a customer table (might be able to recycle the suppliers table to handle this (^_^) )
This would be where you would track your actual sales of what products and to whom they were sold. Because this would be a history table, certain calculated values might be stored here.


Now, lets go back to the tbl_products:
In the form for this table, the row source for a combo/list-box on the form that would be used to record which supplier would be set to the tbl_suppliers with the bound column set to the [tbl_suppliers]![PK] and the control source set to the [tbl_products]![FK_Suppliers])

Similar idea with tbl_invoice and other tables with relationships.
May 14 '14 #2

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

Similar topics

1
2670
by: Paolo | last post by:
I would like some help on the use of combo boxes. I have created a form and named it Customers. This form's record source is a table, also named Customer. I would now like to add an unbound combo box, name it cbosearch, which would return a selected record in a textbox, which I will name txtresult. The cbosearch record source is another table named AGENCIES which has two fields: TOWN and ADDRESS.
3
3560
by: Kent Eilers | last post by:
I want to follow naming conventions for my controls - i usually prefix combo boxes with "cbo". When a form is in datasheet view however i do not want the user to see the 'cbo' prefix in front of the field name. Is there a way to retain this nomenclature and yet have the view display the field name (or anyname i want for that matter)? Thanks --
1
2390
by: MrPaulC | last post by:
Hey, I wonder if anyone can possibly help me with this problem. I'm really struggling with it. Ok, I have a form with a childform inside it which is in datasheet view, this form has two combo boxes, one which selects the category, and the other contains the contents of the category. These combo boxes are linked as in all the examples out there using AfterUpdate. However, the problem with this approach is that when the datasheet form is...
4
1970
by: Miguel | last post by:
I have synchronized combo boxes linking Account Type with Customer Names based on the template that Microsoft has in one of its samples databases. There are the appropriate relationships between the Account Type Table and the Customer Name Table based on the ID field, so it is the ID field which is stored in the main table. However, in the form, the Account Type and Customer Name are displayed because the column width property has been...
7
1845
by: badboybrown | last post by:
I know that this is an age old question and it has been approached a few times, but I've hit a wall and require some help. I have various combo boxes that contain values that are both "current" and "not current". The problem is if you try to limit the drop down to only the "current" values then your old records show a blank if the field contains a "not current" value. One of the solutions I have found is this:
2
1618
by: Ausclad | last post by:
How Would you implement this? I have an existing Access application that needs to be converted to .net I am restricted to use the existing database design. One of the areas is a timesheet data entry screen. The existing Access app writes to a table (tblTimesheetHours). In the data entry screen, the fields, like employee name, job, etc are bound to combo
2
4262
by: ddog | last post by:
I have a form with 3 text fields (one of which is a zip code) and 5 combo boxes. The combo boxes are all set with the first value as 'selected' when the page is first displayed. The 3 text fields are required and are by default empty. I need to validate that the text fields have an entry and that the zip code is numeric and the correct length. If the form fails validation - one of the text fields is empty, for example - I need to alert...
4
1594
WyvsEyeView
by: WyvsEyeView | last post by:
I have a datasheet form in which one field is a combo box that will potentially contain hundreds of records. I've read about several methods of speeding up such combo boxes or limiting their initial contents and I have used those methods on "form view" forms, but they don't lend themselves to datasheet forms. One thing, of course, is to set the Row Source programmatically using the OnEnter event and to limit the Row Source based on a query with...
3
1508
by: dblack64 | last post by:
I am working in Access 2007. I have a form named Master Terms List that contains 4 bound text boxes and 7 cascading combo boxes. The bound text boxes have data sources from a table named Termslist. The record source for the 7 cascading combo boxes is also the table Termslist. The names of the fields on form Master Terms List and the type of controls they are follows: Termslistmonth - text box DateReceived - text box Coordinator - combo box...
1
2224
by: Yasmeen Pannu | last post by:
HI, I am new to MS Access and stuck in a problem from few days. My Question: I have 3 combo box (Submitter, date from and date to) on my form and i want that when i select values from each of these combo boxes, a subform will display all the matching rows based on it, display rows based on selected submitter and the between the dates chosen in 2nd and 3rd combo boxes. All the values are coming from same table. 'date to' and 'date from' is...
0
8234
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
8677
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
8335
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,...
0
8474
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
7158
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...
1
6110
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
5563
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
4079
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...
1
1784
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.