Combo boxes in forms

I am using Access 2007.  I have several tables created for Purchase Order and 
a Purchase Order subform.  The purchase order has the purchase order subform 
embedded in it.  I have several combo boxes in the form.  The combo boxes are 
for supplies and shipping methods.  When I open the combo box and select the 
supplier and/or shipping method and close the form the info is saved for that 
particular purchase order.  When I open the form again, the info is displayed 
as it should be.  When I go to the underlying table that should be storing 
all the information under the suppliers and shipping methods it displays the 
id number instead.  I am sure this is something very, very simple, but I 
can't seen to see what the problem is.  Thanks for your help.
-- 
Bandit
0
Utf
12/11/2007 1:32:00 PM
access.forms 6864 articles. 2 followers. Follow

3 Replies
732 Views

Similar Articles

[PageSpeed] 51

On Dec 11, 6:32 am, Bandit <Ban...@discussions.microsoft.com> wrote:
> I am using Access 2007.  I have several tables created for Purchase Order and
> a Purchase Order subform.  The purchase order has the purchase order subform
> embedded in it.  I have several combo boxes in the form.  The combo boxes are
> for supplies and shipping methods.  When I open the combo box and select the
> supplier and/or shipping method and close the form the info is saved for that
> particular purchase order.  When I open the form again, the info is displayed
> as it should be.  When I go to the underlying table that should be storing
> all the information under the suppliers and shipping methods it displays the
> id number instead.  I am sure this is something very, very simple, but I
> can't seen to see what the problem is.  Thanks for your help.
> --
> Bandit

There are multiple things going on at the same time for a combo box.

A) There is a "Bound" Column. This is the ONE field from the query
that will be saved in a field if the combo box is bound to a field in
a table. It is also the field value that will be returned if you
simply address the combobox field (example msgbox me.comboboxname)


B) There is the number of columns which tells you HOW Many fields are
being returned from the query.


C) There is the FIELD Lengths which define how much space (if any)
each field in that combo box will use in the display when you press
the arrow at the end of the combo box. Once you chose one of the
entries, ONLY the first field that has an actual length will show in
the combobox space, and this may or may NOT be the value that is
saved/
stored (item A above)


D) There is the "Limit to List" property. This will say whether or
not
an entry can be made in the box that is NOT in the underlying query
in
the field that is visible. (the first non 0 lengh field returned from
the query.


You can address any and ALL fields of data returned from the query by
using the .column property as Dave showed you in the prior post.


Dave's answer assumed that you were trying to load a separate txtbox
with the information from the selected emplyee. That will work BUT
the
only item that will show in the combo box - given the way you are
pulling the info with the query - is one of the name fields. in which
case you will have a problem if there are multiple entries for the
same single field value showing. (For instance Smith when there are
multiple lastname Smiths in the emplyee list.)


If you want to show all three in the "COMBOBOX"  then you will need
to
create a dynamic field in your query that concatenates the three into
a single field and have that be the visible and maybe bound field.


All of the above is why - for an employee table - the employee number
is usually the bound field and first displayed field and the name etc
are also shown with the dropdown BUT then loaded for display into a
separate txt field. That way you will always have the right person's
information saved in your record and displayed EVEN when she gets
married/divorced and changes her name.


And the part number is saved/shown so that when the description
changes your tables still work.

AND that is why - most probably - you see the ID Number of the part in
the data instead of the displayed information from the combobox.

Ron
0
Ron2006
12/11/2007 2:42:05 PM
Ron thanks for the response.  I got a little confused though.  "the .column 
property that Dave showed you in the prior post"?  Did I miss a response to 
my own question?  Anyway thanks for the advice I will work on it some more.  
-- 
Bandit


"Ron2006" wrote:

> On Dec 11, 6:32 am, Bandit <Ban...@discussions.microsoft.com> wrote:
> > I am using Access 2007.  I have several tables created for Purchase Order and
> > a Purchase Order subform.  The purchase order has the purchase order subform
> > embedded in it.  I have several combo boxes in the form.  The combo boxes are
> > for supplies and shipping methods.  When I open the combo box and select the
> > supplier and/or shipping method and close the form the info is saved for that
> > particular purchase order.  When I open the form again, the info is displayed
> > as it should be.  When I go to the underlying table that should be storing
> > all the information under the suppliers and shipping methods it displays the
> > id number instead.  I am sure this is something very, very simple, but I
> > can't seen to see what the problem is.  Thanks for your help.
> > --
> > Bandit
> 
> There are multiple things going on at the same time for a combo box.
> 
> A) There is a "Bound" Column. This is the ONE field from the query
> that will be saved in a field if the combo box is bound to a field in
> a table. It is also the field value that will be returned if you
> simply address the combobox field (example msgbox me.comboboxname)
> 
> 
> B) There is the number of columns which tells you HOW Many fields are
> being returned from the query.
> 
> 
> C) There is the FIELD Lengths which define how much space (if any)
> each field in that combo box will use in the display when you press
> the arrow at the end of the combo box. Once you chose one of the
> entries, ONLY the first field that has an actual length will show in
> the combobox space, and this may or may NOT be the value that is
> saved/
> stored (item A above)
> 
> 
> D) There is the "Limit to List" property. This will say whether or
> not
> an entry can be made in the box that is NOT in the underlying query
> in
> the field that is visible. (the first non 0 lengh field returned from
> the query.
> 
> 
> You can address any and ALL fields of data returned from the query by
> using the .column property as Dave showed you in the prior post.
> 
> 
> Dave's answer assumed that you were trying to load a separate txtbox
> with the information from the selected emplyee. That will work BUT
> the
> only item that will show in the combo box - given the way you are
> pulling the info with the query - is one of the name fields. in which
> case you will have a problem if there are multiple entries for the
> same single field value showing. (For instance Smith when there are
> multiple lastname Smiths in the emplyee list.)
> 
> 
> If you want to show all three in the "COMBOBOX"  then you will need
> to
> create a dynamic field in your query that concatenates the three into
> a single field and have that be the visible and maybe bound field.
> 
> 
> All of the above is why - for an employee table - the employee number
> is usually the bound field and first displayed field and the name etc
> are also shown with the dropdown BUT then loaded for display into a
> separate txt field. That way you will always have the right person's
> information saved in your record and displayed EVEN when she gets
> married/divorced and changes her name.
> 
> 
> And the part number is saved/shown so that when the description
> changes your tables still work.
> 
> AND that is why - most probably - you see the ID Number of the part in
> the data instead of the displayed information from the combobox.
> 
> Ron
> 
0
Utf
12/11/2007 6:07:03 PM
On Dec 11, 11:07 am, Bandit <Ban...@discussions.microsoft.com> wrote:
> Ron thanks for the response.  I got a little confused though.  "the .column
> property that Dave showed you in the prior post"?  Did I miss a response to
> my own question?  Anyway thanks for the advice I will work on it some more.  
> --
> Bandit
>
>
>
> "Ron2006" wrote:
> > On Dec 11, 6:32 am, Bandit <Ban...@discussions.microsoft.com> wrote:
> > > I am using Access 2007.  I have several tables created for Purchase Order and
> > > a Purchase Order subform.  The purchase order has the purchase order subform
> > > embedded in it.  I have several combo boxes in the form.  The combo boxes are
> > > for supplies and shipping methods.  When I open the combo box and select the
> > > supplier and/or shipping method and close the form the info is saved for that
> > > particular purchase order.  When I open the form again, the info is displayed
> > > as it should be.  When I go to the underlying table that should be storing
> > > all the information under the suppliers and shipping methods it displays the
> > > id number instead.  I am sure this is something very, very simple, but I
> > > can't seen to see what the problem is.  Thanks for your help.
> > > --
> > > Bandit
>
> > There are multiple things going on at the same time for a combo box.
>
> > A) There is a "Bound" Column. This is the ONE field from the query
> > that will be saved in a field if the combo box is bound to a field in
> > a table. It is also the field value that will be returned if you
> > simply address the combobox field (example msgbox me.comboboxname)
>
> > B) There is the number of columns which tells you HOW Many fields are
> > being returned from the query.
>
> > C) There is the FIELD Lengths which define how much space (if any)
> > each field in that combo box will use in the display when you press
> > the arrow at the end of the combo box. Once you chose one of the
> > entries, ONLY the first field that has an actual length will show in
> > the combobox space, and this may or may NOT be the value that is
> > saved/
> > stored (item A above)
>
> > D) There is the "Limit to List" property. This will say whether or
> > not
> > an entry can be made in the box that is NOT in the underlying query
> > in
> > the field that is visible. (the first non 0 lengh field returned from
> > the query.
>
> > You can address any and ALL fields of data returned from the query by
> > using the .column property as Dave showed you in the prior post.
>
> > Dave's answer assumed that you were trying to load a separate txtbox
> > with the information from the selected emplyee. That will work BUT
> > the
> > only item that will show in the combo box - given the way you are
> > pulling the info with the query - is one of the name fields. in which
> > case you will have a problem if there are multiple entries for the
> > same single field value showing. (For instance Smith when there are
> > multiple lastname Smiths in the emplyee list.)
>
> > If you want to show all three in the "COMBOBOX"  then you will need
> > to
> > create a dynamic field in your query that concatenates the three into
> > a single field and have that be the visible and maybe bound field.
>
> > All of the above is why - for an employee table - the employee number
> > is usually the bound field and first displayed field and the name etc
> > are also shown with the dropdown BUT then loaded for display into a
> > separate txt field. That way you will always have the right person's
> > information saved in your record and displayed EVEN when she gets
> > married/divorced and changes her name.
>
> > And the part number is saved/shown so that when the description
> > changes your tables still work.
>
> > AND that is why - most probably - you see the ID Number of the part in
> > the data instead of the displayed information from the combobox.
>
> > Ron- Hide quoted text -
>
> - Show quoted text -

You may have missed NOTHING.   There were two questions in the group
and I copied my answer to the other one and posted it here also. (and
obviously there was no prior response in this string.)

Sorry for the confusion.
Ron
0
Ron2006
12/11/2007 9:08:43 PM
Reply:

Similar Artilces:

Can Drop Down Boxes jump to the answer as you type?
If I create a form with VBA, to create a drop down box to have a list to pick an answer for to fill in a cell in a worksheet, it will jump to the answer in the list as you type. Can a Data|Validation|List do the same thing? If not, is there a way to get that functionality in Excel? Data Validation doesn't support autocomplete. If you can use programming, there are instructions here for adding a combobox from which you can select one of the values from the data validation list. In the combobox, you can enable autocomplete: http://www.contextures.com/xlDataVal11.html rrucksda...

Restricting input box entries to integers
Dear Experts: below macro applies a user-defined paragraph style to rows using an input box. The macro is running fine. But the input box also allows for entries such as 7,2 (comma because I live in Germany). How do I have to re-write the code to only allow integers as input box entries? Help is much appreciated. Thank you very much in advance. Regards, Andreas Sub Tbl_BodyStyle() Dim oRng As Word.Range Dim oTbl As Word.Table Dim AskRowNumber As String Dim blnAsk As Boolean If Not Selection.Information(wdWithInTable) Then MsgBox "Please place the cursor...

Self-Made Combo Boxes not working correctly...
Okay all.. Here's my deal... I have tried and tried and tried to get these to work... I'm going to post what I have done, and what I am trying to do, and see if someone can help me figure crap out... tblBuilding - PK is BuildingIDNum - Autonumber tblBuildingZones - FK is BuildingIDNum via SELECT DISTINCTROW Building.BuildingIDNum, Building.Name FROM Building ORDER BY Building.BuildingIDNum; cboBuilding - This has Building 1, Building 2, etc. The field displaying this info is "Name" in tblBuilding. cboBuildingZones - This has different "zones" for Building 1,...

Stripping Blank Characters form Imported Data
I am trying to verify 2 worksheets full of data. One has been imported from Visual Basic and the other from Business Object. The Business object sheet, brings over the entire field not just the charaters needed. Example: For the city field there are 50 characters available. If you use Nashville, the Business Object brings over 50 characters where the Visual Basic brings over 9. When trying to find descrepancies, this brings back a false positive if the city is the same. Is there a way to manipulate that data when it is sent to Excel? The easiest way to deal with this would be to find...

Need help with Combo Box?
I would appreciate any help with this. I currently have a form with two combo boxes and a subform. The first combo box lists counties and the second box lists doctors in selected county. After selecting county, doc the subform lists pts for this doc. All this works fine. However, I need to add a couple of more filters. I am stuck and would like to know how to do this. I don't want to mess up what I already have. How can I incorporate a couple more filters? I thought maybe adding an option box to the form????? Can someone please help me to accomplish this? Thank you. Sure...

Do I need DSClient to run Exchange 5.5 on an NT4.0 box in Windows 2003 Native Mode ADS?
Good Evening, I am in the process of migrating my WinNT4.0 domain and Exchange 5.5 Org to Windows 2003 ADS/Exchange 2003. I know best practice is to change the domain to Native mode, but how does this affect my NT4.0 server running 5.5? Do I need to simply load the DSClient onto the server? I should also note that we did an inplace upgrade from NT 4.0. This is a single domain environment. As long as you no longer have NT 4.0 BDCs you should be able to move to native mode. Your NT 4.0 server running E55 will not be affected (unless of course it is also a BDC). It is a good idea to...

Trouble with Forms based authentication in OWA
I am having some problems in setting up OWA with forms based authentication. From my understanding it should work like this: I go to my usual address http://<myserverdomain>/Exchange and I will be directed to the Forms Based Authentication login screen. Once I am there I can choose basic or premium function in OWA and once I authenticate I should be able to access OWA without any other login prompts. Well none of that is happening. Here is what I have done so far. 1. Enabled Forms based authentication in Exchange System manager. 2. Verified that that Authenticated Users group has Read...

click on page form tab to filter subform
I have page tab with following names: Flat Rate, Global Rate, MSRP Rate. I would like to have subform only show the rates for each page tab. How do I go about doing this. I am new to VBA and from reading all the threads, I can't seem to find the one that fits my exact need. Please explain step-by-step since I am new. Let me know if I need to provide more details. Thank you. Hi Kris Presumably you have a field in the RecordSource of your subform that contains one of the three values (Flat Rate, Global Rate, MSRP Rate) or some other text or code that corresponds to these values....

Query by Form Problem 06-19-07
I'm using QBF with about six different combo boxes using: [forms]! [formmain]! [combo1] or [forms]![formmain1]![combo1] -like in a VBA book. This is so users can select criteria on a form with the combo boxes, and when they are done, they hit the search button, and it opens up another form based on the query just performed by the combo selection. This worked for about three combo boxes, but when I added another one, it freezes up and opens up a blank page. It's supposed to open the new form based on the query. Is there a better way to do this? I've looked exhaustive...

Table relationships
I've created a database with about 15 tables for a participant data in a research study. Each participant will complete the 15 assessment measures. My ultimate goal is to create a data entry system whereby a research assistant can pull up a form and enter an ID number, plus the answers to the 15 assessment measures. I know I can create a query to combine all the tables, but it seems like the research assistant would have to enter the id and date 15 times (once for each table pulled in to the query). Is there a way to just enter the ID number one time and have it apply t...

Lock and Unlock a Form
I have read many of the other posts in regards to locking and unlocking forms but i am still unable to get it to do what i want. Let me explain my setup. I am working on form to help capture incidents that we have. Each form can have up to 4 subforms. 1 subform is embedded on the main form and the others are on tabs and can be opened using an option group. I have one main number as a key to group all the forms together in a 1-1 relationship. On the main form I have added a combo box with "open" and "close" to help prevent accidental erasing of already entered recor...

Using skins in a multiline edit box
Hi, I have a dialog based application, in which I have a multi-line edit control. In the edit control, I would like to have a background image, say some .bmp file. Some status messages are to be displayed in the edit control, based on certain user actions in the dialog. How do I go about this? Thanks, Sucharit you can do it, i think, if you were to create a class which inherited from the edit control, then in the override the OnDraw()/OnPaint() event, where you first get the rect, and draw your bitmap resource, then call the parent event method to do the rest... I don't know if t...

Excel's column width format box
Does anyone know why I am unable to enter a number into Excel's column width box, yet using the mouse, I am able to adjust the width. When opening the text box, I can delete the number that appears, but am unable to even reenter that one after it is deleted. I must tell you that I'm a new user who's working through numerous tutorials. Thanks, Hi do you get an error message or what happens exactly -- Regards Frank Kabel Frankfurt, Germany rly2rys wrote: > Does anyone know why I am unable to enter a number into Excel's > column width box, yet using the mouse, I am ...

Why do sheet tabs keep disappearing? Box in Tools is checked.
When I open a new or existing Excel file, the sheet tabs at the bottom may or may not show up. I have repeatedly gone to Tools, Options, View and made sure the sheet tabs box is checked, but still no tabs. How do I get them back? I can't get from one page of a workbook to another. This is in Offfice 2003. Hi Arlie, Try Tools/Options/General In the Sheets in new workbook box, check and see how many sheets are set to appear when opening a new workbook. Larry -- keithl816 ------------------------------------------------------------------------ keithl816's Profile: http://w...

CRM, Reporting Services & Forms Authentication
Our company has an app with forms auth that is integrated with Reporting Services. We have forms auth working successfully with Reporting Services. We'd like to integrate CRM and still use forms auth. Is this possible with CRM? Would anyone be kind enough to point me to any documentation or examples of CRM w/ forms auth & Reporting Services? ...

Check Boxes #6
Is there an "easy" way to add check boxes to a worksheet? As it stands, I have to manually attach it to the underlying cell, and adjust the size. I would like to add several hundred checkboxes. Am I doing somethig wrong, or is it just that akward and labor intensive in Excel? Hi Adam, Try: '=============>> Public Sub Tester01() Dim SH As Worksheet Dim rng As Range Dim rCell As Range Set SH = ActiveSheet '<<==== CHANGE Set rng = SH.Range("A1:A100") '<<==== CHANGE Application.ScreenUp...

Synchronize combo boxes
I am trying to sync to combo boxes on a form. It is for plant names which consist of Genus + Species + Subspecies, basically. I have all my data in a single table and I want only applicable species to show up for a particular Genus, for example: Abies concolor Abies glauca Abies alba Quercus alba Quercus macrocarpa Any genus can have many species, some of those species names can exist within multiple Genus names, I have made to seperate tables with just Genus and just Species names, I want them to link in the combo boxes, any ideas? Previously responded to... Regards ...

Form with adding
Hello I want to create a form for people who use a cabin The columns titles are: name, number of nights, age group, $ per night, then total $'s The $'s per night depends on the age group. It's $10 for ages 0-12, $20 for 13-18, and $30 for 19+. I'm doing a drop down menu for the age groups. Based on their choice, I want the $'s per night to come up automatically in the next column My questions are 1) Is it best to be doing this in Excel, or should I use Word 2) Assuming Excel, how do I set up the $'s per night based on the drop down menu selection 3) I'd like ...

How to detect when user switches between open forms?
The user can have multiple non-modal, restored, forms open at once and can switch between them as they want, often by just clicking on their titlebars. These forms are all instances of F_URL. I am using Vista, Access 2007. How do I run a routine anytime the user switches form? F_URL.GotFocus doesn't fire because the Focus event only fires for the particular control that has the focus on the form, and, there are many such possible controls. F_URL.Activate doesn't fire. So, four possibilities as far as I can see: 1. There is probably some obvious event that I'm ju...

Conditional Formatting for Image box on Continuous Forms
Hello again, This problem is driving me crazy. I am a car enthusiast and love taking photos of classic cars. I have a table which describes the make and model in a series of fields. There are several fields that contain a reference to photos of those cars. Ie: the fields are called "Front" "Side" "Rear" "Angle". My form has four image boxes to display the images stored in these fields. But when I open the form all the records show the images of the first car only. I asked about this a few days ago and was advised to check out http://www.lebans.co...

Combo Box 11-21-07
Hi I have a database where on the main form (it's a pop-up), there's a combo box that allows the user to select a person's name. That should bring up the record and display the data. However, for some reason, it's stopped working? The Name field at the top of the form now reads "#Name?" even though the field is specified as "Client"&FirstName& and I get an error message of "The expression After Update you entered as the event property setting produced the following error: Object or class does not support the set of events" Can someone ...

2003 SP3
I read one posting that said the > or other such formats is what causes your drop down box text to not be shown. I can't remove these as we rely on all the data being in upper case for formality purposes. I read another article that said the following hotfix fixes some of the problems: http://support.microsoft.com/kb/945674 I looked it up and it says: 945280 Combo box controls and list box controls display no value or incorrect values in Access 2003 after you install office 2003 Service Pack 3 I have not values visable, but they are there - does anyone know if this fix is the ...

How do i print an excel file in the form of a booklet?
I have a list of phone numbers and addresse that I need to print in the form of a small booklet that I can carry in my purse. How do I print it? What program and how to set it up? Also I want ohotos on the left and data on the right side pages. I'm not sure excel is the best application for this kind of thing. I'm sure you could do it (after a few hours/days/months of frustration!), but maybe you could find a better application by searching google. Or even put the data into MSWord and use that for all the nice formatting. shireen wrote: > > I have a list of p...

Form now Sub-Form, Query Broken
I recently posted this problem in "Forms" (Lost Focus of Form 7/27) thinking that was the problem, but recently discovered the problem appears to be in the query(ies). I've dropped a from into a form that has multiple tabs/pages to consolidate things. The other - now sub-forms still function as before, but this one retrieves records from the archive and drops them in the the main employee table. The following pops up as an input box - Forms.Archive.track I found this in one of the queries where: Field: Track - its the unique identifier for the employee table Table: E...

How to reference fields/objects on a form
Hello, Can anyone help me understand how to reference the fields/objects on a form when querying/updating database tables? Example: Form name = "frm_Cont_master" 1. SSN (text box) 2. First name (text box) 3. Last Name (text box) 4. Company (Assume this is a combo box selecting Company name and/or Company ID number from a seperate lookup table). 5. Department (Assume this is combo box selecting department name/number from 2nd lookup table, based on the value in #4 above). Assume Company ABC has departments 1-5 and Company XYZ has departments 6-9. Selecting ABC in ...