Form with an unbound combo box.

I´m trying to create a database but I take some examples from Inside Out 2007
by Viescas.I create a tblTeams ( TeamID,TeamName) tblPlayers(PlayerID) and
tblTeamPlayers(TeamID,TeamName,PlayerID). I create a form based on qryplayers
and I need a combobox  "unbound?"  called TeamName based on qlkqTeams but
when I  try to open the combobox always shows the TeamID instead of TeamName.

 In the sample database "Contacts" from Viescas the CompanyName is  display
in the combobox CompanyID. I don´t really Know how this happen.Can anybody
give me an idea of how this works? Thanks

-- 
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/201002/1

0
JOSELUIS
2/17/2010 11:05:52 PM
access.forms 6864 articles. 2 followers. Follow

3 Replies
1567 Views

Similar Articles

[PageSpeed] 55

On Wed, 17 Feb 2010 23:05:52 GMT, "JOSELUIS via AccessMonster.com"
<u58123@uwe> wrote:

> In the sample database "Contacts" from Viescas the CompanyName is  display
>in the combobox CompanyID. I don�t really Know how this happen.Can anybody
>give me an idea of how this works? Thanks

A Combo will display the first *non zero width* column in its rowsource.

The RowSource is where the combo gets its data from. This is typically a
Query; it can have many (up to ten, I believe) fields.

The ColumnCount property specifies how many of those columns are available.

The Bound Column defines which of the fields will become the combo's value
when a selection is made.

The Control Source is the name of the table field into which that value will
be stored (this can be blank, if the purpose of the combo is other than
storing a value in a table).

The ColumnWidths is a string of numbers separated by semicolons, defining the
display width of each column; if a column is of zero width, it's part of the
combo but not shown to the user.

For example, you could have a RowSource query like

SELECT CustomerID, LastName & ", " & FirstName AS CustName, CustAddr,
CustPhone, LastName, FirstName FROM Customers ORDER BY LastName, FirstName;

If the combo has ColumnCount = 4 only the ID, full name, address and phone
will be included in the combo's data.

The Bound Column would be 1 - so that the ID will be stored.

If the ColumnWidths property is

0";1";1.5";.5"

the user will see the customer's name when the combo is not dropped down (e.g.
"Vinson, John", and the address and phone will be after it when it is dropped
down. The CustomerID will not show because its width is zero.
-- 

             John W. Vinson [MVP]
0
John
2/17/2010 11:33:45 PM
Thank you vey much for your help. You really do it simple and clear so thank
you very much from Spain.

John W. Vinson wrote:
>> In the sample database "Contacts" from Viescas the CompanyName is  display
>>in the combobox CompanyID. I don´t really Know how this happen.Can anybody
>>give me an idea of how this works? Thanks
>
>A Combo will display the first *non zero width* column in its rowsource.
>
>The RowSource is where the combo gets its data from. This is typically a
>Query; it can have many (up to ten, I believe) fields.
>
>The ColumnCount property specifies how many of those columns are available.
>
>The Bound Column defines which of the fields will become the combo's value
>when a selection is made.
>
>The Control Source is the name of the table field into which that value will
>be stored (this can be blank, if the purpose of the combo is other than
>storing a value in a table).
>
>The ColumnWidths is a string of numbers separated by semicolons, defining the
>display width of each column; if a column is of zero width, it's part of the
>combo but not shown to the user.
>
>For example, you could have a RowSource query like
>
>SELECT CustomerID, LastName & ", " & FirstName AS CustName, CustAddr,
>CustPhone, LastName, FirstName FROM Customers ORDER BY LastName, FirstName;
>
>If the combo has ColumnCount = 4 only the ID, full name, address and phone
>will be included in the combo's data.
>
>The Bound Column would be 1 - so that the ID will be stored.
>
>If the ColumnWidths property is
>
>0";1";1.5";.5"
>
>the user will see the customer's name when the combo is not dropped down (e.g.
>"Vinson, John", and the address and phone will be after it when it is dropped
>down. The CustomerID will not show because its width is zero.

-- 
Message posted via http://www.accessmonster.com

0
JOSELUIS
2/18/2010 11:34:37 PM
On Thu, 18 Feb 2010 23:34:37 GMT, "JOSELUIS via AccessMonster.com"
<u58123@uwe> wrote:

>Thank you vey much for your help. You really do it simple and clear so thank
>you very much from Spain.

El gusto es mio.
-- 

             John W. Vinson [MVP]
0
John
2/18/2010 11:49:10 PM
Reply:

Similar Artilces:

Close and Inactive form
Hi, I am wanting to have an open form closed automatically if the form has been open for a specified period of time with no data added to it. We have a number of staff members who for whatever reason leave the office without closing open forms. Any Ideas would be appreciated. -- Jens On Sat, 13 Mar 2010 03:38:01 -0800, Jens <Jens@discussions.microsoft.com> wrote: Check these out: http://msdn.microsoft.com/en-us/library/bb243861.aspx http://support.microsoft.com/kb/259971 -Tom. Microsoft Access MVP >Hi, I am wanting to have an open form closed automatically...

Re-set picture property for each continuous form
I'm sure this will have been asked before: I need to change the picture property of an image control on each generation of a continuous form. Basically, I am creating a list, each row of which is one generation of a continuous form, and want an icon alongside each row which relates to the content of the row. Unlike reports, there is no OnFormat event for the detail section of a form. I need to use a form and not a report as I want interactivity - effectively inline edit. Any ideas? One of many solutions. I would keep your images tiny as this will be a performance hit on a contin...

Disabling the form assistant
Because of the lack of ability to customize form assistant, it sometimes confuses our users. Consequently for the time being I would like to disable it globally. Does anyone know how this can be done? ------=_NextPart_0001_0DD6300C Content-Type: text/plain Content-Transfer-Encoding: 7bit Hi Phil, We are considering adding a way to globally disable the form assistant in the next version of CRM. Until then you can disable it by updating the FormXml of the forms that use it. Here are some instructions that are being considered for the next release of the V3 documentation: 1. ...

MsgBox and a pop up form
I have an application that pop up a form (vbModal) asking for password in order to proceed. It pops up after a period of idling. It works prettty well. The hassle comes when there is a MsgBox popping up and the user does not respond, then the modal form pop up. Now I got 2 modal things, and you cannot click anything to move on. I have been sidestepping the problem by disabling the modal form whenever I show msgbox. I am wondering if there is a better way to do this. "phil hunt" <a@abc.com> wrote in message news:i43f9i$k9b$1@speranza.aioe.org... >I have...

Calculate based on check box
I have a form called "Investments" and then a subform set up to record detailed investment transactions for each investment. I would like to add the "Investment cost" field in the footer of the subform based on only those detailed transactions with no check in the check box for "replaced/sold" (which means they are still active investments). Normally I would just set up an unbound text box and use =sum([InvestmentCost]) to calculate that field, but how do I bring into this formula only those with no check? I am new to access...so I hope I explained this...

Sub forms?
I'm trying to create a CFormView derived form that contains some static labels (obviously), a drop-down list (CComboBox), a tab control (CTabCtrl or CPropertySheet doesn't matter) two embedded forms (selected by the tabs although one of these forms will be re-used multiple times), and a couple of buttons (Ok, Cancel). I've tried various and sundry things and I can get the sub form (embedded CFormView with a CTabCtrl or a CPropertyPage with the CPropertySheet) to display and I can even select them with the mouse. What I seem unable to do is to get the tab order to work "seaml...

Outlook 2000 E-Mail, No Email Coming in, Just Dialogue Boxes Looking for Errors
My MS Outlook box is not accepting incoming E-mails when I click on "Send/Receive", I get a pop-up dialogue box that tries to confirm the password for both incoming and outgoing mail (POP and SMTP). I cannot get my mail. I did set up a Passport account, using the same e-mail name. How do I correct this? ...

Sub Form
Hi, I need to have a subfrom from my main form which appears when the user presses a button. I have tried to add a subform using the subform button in the access toolbox - but this adds the subform within the main form, which I do not require. It makes the form look too busy. I have tried to add a subform using the form function button. This launches my child form, but the data does not connect to my parent form connecting this way. Any thoughts, please? Simplest solution is to put a tab control in your form. Put the existing controls in the first page of the tab control, and the...

Message stuck in in box
I have this problem. How do i get these messages out and onto the person sent to. I look at others with the same problem but did not find an answer. Please help! See www.oehelp.com/WMUtil/ steve "Patricia" <Patricia@discussions.microsoft.com> wrote in message news:A0256767-38C4-40EF-85A0-732D81D90A42@microsoft.com... >I have this problem. How do i get these messages out and onto the person >sent > to. I look at others with the same problem but did not find an answer. > Please help! Hello Patricia, In addition, the options listed in ...

HTML mails with input boxes/form
I have an Internet application that sends HTML mails. These mails consist of input boxes: A receiver basically gets a webpage with a HTML form. However when I receive such a mail in Outlook 2000, type something in the input boxes and then try to forward the mail all input boxes are empty! As far as I can tell they are even no input boxes anymore but are converted to images: They look like input boxes but you can't enter anything anymore. Why isn't it possible to enter something in a HTML mail and then forward the mail? Is this a restriction of Outlook 2000? Or is there any option to ch...

Multi Value list box selects all customer
I have this code as a multiValue listbox but everytime i select which customer i want it select them all, can anyone tell me how i can fix's this thanks Dim varitem As Variant Dim strTempItem As String For Each varitem In Me.lstReportFilter.ItemsSelected strTempItem = strTempItem & " [SalesGroupingField]=" & Me.lstReportFilter.ItemData(varitem) & " Or " Next strTempItem = "(" & Left(strTempItem, Len(strTempItem) - 4) & ")" Have you set the MultiSelect to Simple on the list's property box (it's...

images on a form
Alright I have a db that is pretty basic. It has a First and Last Name field a Title Field and seven YES/NO fields. What I want is that when I run a query on a specific employee name it will pop up a form displaying a photo of the employee and another image or something displaying (basically pass or fail) whether they have completed all test requirements. Meaning that all of the seven YES/NO fields are checked yes. Again, if all of the seven YES/NO fields are check they pass and if not they fail and I would like something to display to say that. I have already figured out how to ...

get data form cells sequentially #3
Thanks, it works a treat. Everything is running correctly now. Thanks again SW -- swmasso ----------------------------------------------------------------------- swmasson's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=838 View this thread: http://www.excelforum.com/showthread.php?threadid=26161 ...

Calculate sequential number in a protected form.
I have a protected form that users will fill in fields and then save it under a new name. This form replaces a 7 part carbon form that is sequentially numbered. I am looking for information on how to have the form open with the next number each time it is accessed. Any help would be greatly appreciated. See http://www.word.mvps.org/FAQs/MacrosVBA/NumberDocs.htm. -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. gtc@idl wrote: > I have a protected ...

Edit Picklist in Outlook client Look Up Records form
When a user clicks Regarding to track an email in CRM, the Look Up Records form appears. We only associate emails with just a few of the entities, and would like to narrow down the picklist values available. Is there a way to hide or edit the picklist values available on this form? Thanks! miss_b The only method to change this list is to remove permission for the specific entity from the users roles. But this does have impact on other functionalities. -- Patrick Verbeeten (MCPD) Lead Developer Aviva IT Tools for CRM Developers and Administrators http://www.patrickverbeeten.com/Too...

replicate combo boxes
I have cells in 2 columns in a worksheet with combo boxes. How can I replicate the combo boxes down the columns so that every combo box has the correct Control Cell Link? I want each row to have its own combo in the relevant columns Cell formula:- =INDEX(Controls!$A$2:$A$5,Log!L3,0) - this replicates OK using Ctrl + Dow Control Input Range:- Controls!$A$2:$A$5 - this value stays constant Control Cell Link:- Log!L3 - this value needs to change to Log!L4; Log!L5 etc. Controls do not have any n...

pain in the butt dialog boxes
I have a little problem that's been driving me absolutely nuts. All I want to do is have a dialog box pop up in the middle of my windows api and c++ program get a number in a textbox and the let my windows api program pop open a window that does the real stuff. but I've tried several things and many many websites and haven't been able to figure out how to make the damn thing work. I've already written the code for the main program, I just can't get any input other than direct keyboard messages. I'm using directx in the main program so that complicates it some but I&#...

AIA forms G702 and G703
Has anyone created an AIA using Excel with the forms G702 and G703? I have one that I created quite a few years ago that has 3 pages of G703, but now I've got myself confused about it and have a question. If you can offer some assistance, please email me at AAAD_Koers@msn.com (remove the AAA from the email address first). -- Thanks, Diane ...

form question
is it possible to have an animated gif work on a form? If so how? Not possible with the default Excel image control etc. You will need to use a 3rd party ActiveX control. Alternatively you could use the Internet Explorer component. However this will add a bit of bulk and an extra dependency to your solution. -- Regards, Bill Lunney www.billlunney.com "macamarr" <macamarr@cox.net> wrote in message news:091d01c35027$d45235d0$a301280a@phx.gbl... > is it possible to have an animated gif work on a form? If > so how? As a more complete follow up. Add the IE contr...

POST an XML string to a URL from a windows form
I have a HTML-form that I need to be able to POST from my VB.NET client application and store the resulting XML in a STRING or XML-document. This is the HTML-form code: <form name="form1" method="post" action="http://www.ourdomainname.se/xml"> <textarea name="xmlrequest" cols="80" rows="20"> <?xml version="1.0" encoding="UTF-8"?> <searchgetevents> <header> <saler_id>0</saler_id> <request_id>0</request_id> <requestdatetime>2005-09-03</requestdat...

Sorting not working on Form
Have a query which is display in order as expected. However when using the query in a form which data showed as the sequence of data input NOT as how it is showed in query. What need to be done to have it list as in query. I have tried the order by but there is no effect. Are you working with a form or a report? When I create a form based on a query, the form displays the data in the sort order given by the query. Regards Jeff Boyce Microsoft Office/Access MVP "Smiley" <firework123@googlemail.com> wrote in message news:fjjt1v$3hu$1$8300dec7@news.demon.co.uk... >...

Searchable setting on attribute form vs. xml
I need to remove +/- 50 attributes from available fields in Advanced Find for an entity. No problem, open the customization form for the entity, select each attribute and change "Searchable" to No. Oh wait, I have to do this for 50 attributes and I want to go home sometime today. No problem: export the xml for the entity, remove the "ValidForAdvancedFind" value from the "DisplayMask" element of each desired attribute, save the entity xml and re-import back into CRM. Wait a minute; every attribute that was altered in the just-imported xml file still has "Searc...

Outlook server crashing and forms
We had a hardware issue last week, which resulted in the crash of our Outlook server. It was a backup procedure that actually caused the hardware to fail, so out last successful backup was about 1 and half weeks ago. While we were able to recover lost emails, and those that we had moved to our archives survived, when reposting the forms we noticed another problem: Any forms that were in a persons Inbox, or subsequent folder when the crash occurred seems to have lost the data from that form. Basically, the email will reappear in your inbox, but the data fields will be left empty. Also, on ...

Default folder to Public folder when Exporting outlook form data to excel
I am trying to get a code for exporting data from an outlook form to default to export a certain folder. I keep getting the Object Could not be found error. When I try it with my personal folders it work but when i try it with the public I can't get it to work. Is it set up wrong for public folder selection? Please help I get the error on " Set olTest = olFolder.Folders("Test Folder")" Heres the code... Sub Auto_Open() Dim olApp As Outlook.Application Dim olNamespace As Outlook.Namespace Dim olFolder As Outlook.MAPIFolder Dim olTest As Outlook.MAPIFolder ...

Distributed Processes box is grayed out
I'm trying to set my User Preferences to make use of a process server, however, the radiobuttons in the Distributed Processes box are grayed out. I'm Poweruser and the process server is set in DPS setup. Is there any product/module that I need to install or register? Thanks, Hector ...