Prev: excel 2000
Next: Raymond
From: Bob Vance on 6 Apr 2010 18:38 Should I try and force a textbox from a query with the same ClientID Number to give the name...Thanks Bob "Bob Vance" <rjvance(a)ihug.co.nz> wrote in message news:uOeM6Vb1KHA.3412(a)TK2MSFTNGP05.phx.gbl... > Thanks Jeff it does have a Value List, but what ever way I change it I can > not get Dobbie, Chris Only Dobbie > So I assumed it must be a code controlling the Combo Box! > It would have nothing to do with the case that opens the Form would it? > DoCmd.OpenForm "frmInvoiceClient", , , , , , "ModifyOldInvoice" > Regards Bob Vance > > "Jeff Boyce" <nonsense(a)nonsense.com> wrote in message > news:%23ggEFiZ1KHA.224(a)TK2MSFTNGP06.phx.gbl... >>I don't see a question in this... >> >> I don't understand what you mean by "my combobox is being controlled by >> this... I thought you said the combobox was 'fed' by a value list... >> >> Regards >> >> Jeff Boyce >> Microsoft Access MVP >> >> -- >> Disclaimer: This author may have received products and services mentioned >> in this post. Mention and/or description of a product or service herein >> does not constitute endorsement thereof. >> >> Any code or pseudocode included in this post is offered "as is", with no >> guarantee as to suitability. >> >> You can thank the FTC of the USA for making this disclaimer >> possible/necessary. >> >> "Bob Vance" <rjvance(a)ihug.co.nz> wrote in message >> news:OdjQfYS1KHA.3412(a)TK2MSFTNGP05.phx.gbl... >>> Thanks Jeff, my combo box cbOwnerName is being controlled by this! >>> tblInvoice.OwnerName is correct Dobbie, Chris >>> Regards Bob >>> >>> If CurrentProject.AllForms("frmMain").IsLoaded = True Then >>> cbOwnerName.RowSource = Form_frmMain.cboClient & ";" & >>> Form_frmMain.cboClient.Column(1) >>> cbOwnerName.value = Forms!frmMain!cboClient.Column(1) >>> recInvoice.Open "SELECT * FROM tblInvoice where OwnerName='" >>> & cbOwnerName.value & "';", CurrentProject.Connection, adOpenDynamic, >>> adLockOptimistic >>> >>> If recInvoice.BOF = False And recInvoice.EOF = False Then >>> If recInvoice.Fields("OwnerAddress") = "" Or >>> IsNull(recInvoice.Fields("OwnerAddress")) Then >>> recInvoice.Fields("OwnerAddress") = "" >>> Else >>> tbAddress.value = recInvoice.Fields("OwnerAddress") >>> End If >>> End If >>> >>> cmdAdd_Click >>> >>> Else >>> recInvoice.Open "SELECT * FROM tblInvoice where InvoiceID=" & >>> Forms!frmMain!frmModifyInvoiceClientFromMain.Form!lstModify.value _ >>> , CurrentProject.Connection, adOpenDynamic, adLockOptimistic >>> subShowInvoiceValues >>> subShowInvoiceDetailValues >>> >>> If CurrentProject.AllForms("frmMain").IsLoaded = True Then >>> cbOwnerName.value = Form_frmMain.cboClient.value >>> Else >>> cbOwnerName.value = recInvoice.Fields("OwnerID") >>> End If >>> >>> "Jeff Boyce" <nonsense(a)nonsense.com> wrote in message >>> news:ufC1HxR1KHA.2156(a)TK2MSFTNGP02.phx.gbl... >>>> Bob >>>> >>>> It sounds like you are expecting the combobox to display more than one >>>> column AFTER you've made your selection. That isn't how it works. >>>> >>>> If you want to see column 2 and column 3 after selection, you have a >>>> couple possibilities... >>>> >>>> One is to do away with column 3! Instead, use something like 18; >>>> "Dobbie, Chris". >>>> >>>> Or another would be to add a text box into which you have Access >>>> 'shove' that third column after selection. >>>> >>>> Regards >>>> >>>> Jeff Boyce >>>> Microsoft Access MVP >>>> >>>> -- >>>> Disclaimer: This author may have received products and services >>>> mentioned >>>> in this post. Mention and/or description of a product or service herein >>>> does not constitute endorsement thereof. >>>> >>>> Any code or pseudocode included in this post is offered "as is", with >>>> no >>>> guarantee as to suitability. >>>> >>>> You can thank the FTC of the USA for making this disclaimer >>>> possible/necessary. >>>> >>>> "Bob Vance" <rjvance(a)ihug.co.nz> wrote in message >>>> news:uUGxDnR1KHA.348(a)TK2MSFTNGP02.phx.gbl... >>>>> My Combo Box has no Control source and the Row Source type is Value >>>>> List >>>>> My Row Source is showing say 18;Dobbie,Chris >>>>> Bound Column 1 >>>>> My format is 3 column count 0cm:7cm;0cm but even if i try to show >>>>> the last Column I am not getting "Chris" only when I click the arror >>>>> do I see the name >>>>> At the moment when I open my form I am getting just Dobbie and would >>>>> like to get Dobbie, Chris >>>>> >>>>> -- >>>>> Thanks in advance for any help with this......Bob >>>>> MS Access 2007 accdb >>>>> Windows XP Home Edition Ver 5.1 Service Pack 3 >>>>> >>>>> >>>> >>>> >>> >>> >> >> > >
From: Steve on 6 Apr 2010 19:05 Hi Bob, I think the only way you can get Dobbie, Chris is to change the Row Source Type to a query with two fields. The first field returns 18. The second field is a calculated field that returns Dobbie, Chris. You will have to change Column Count to 2 and Column Width to 0;7 cm. Steve santus(a)penn.com "Bob Vance" <rjvance(a)ihug.co.nz> wrote in message news:uUGxDnR1KHA.348(a)TK2MSFTNGP02.phx.gbl... > My Combo Box has no Control source and the Row Source type is Value List > My Row Source is showing say 18;Dobbie,Chris > Bound Column 1 > My format is 3 column count 0cm:7cm;0cm but even if i try to show the > last Column I am not getting "Chris" only when I click the arror do I see > the name > At the moment when I open my form I am getting just Dobbie and would like > to get Dobbie, Chris > > -- > Thanks in advance for any help with this......Bob > MS Access 2007 accdb > Windows XP Home Edition Ver 5.1 Service Pack 3 > >
From: John W. Vinson on 6 Apr 2010 19:25 On Wed, 7 Apr 2010 06:18:08 +1200, "Bob Vance" <rjvance(a)ihug.co.nz> wrote: >Thanks Jeff it does have a Value List, but what ever way I change it I can >not get Dobbie, Chris Only Dobbie >So I assumed it must be a code controlling the Combo Box! You assumed wrong. If you have a value list containing the text string "Dobbie" that's exactly what you'll get in the combo box. If the value list contains the string "Dobbie, Chris" you'll get that! I would recommend using a Query with a calculated field. My telepathy is a bit rusty, but assuming that you have a table of People with fields PersonID, LastName and FirstName you could create a query SELECT PersonID, [LastName] & ", " & [FirstName] FROM PEOPLE ORDER BY LastName, FirstName; (copy and paste this into the SQL window of a query and adjust the table and fieldnames to your own objects' names). Save the query and change the combo's row source type to Table/Query and reference the saved query. >It would have nothing to do with the case that opens the Form would it? > DoCmd.OpenForm "frmInvoiceClient", , , , , , "ModifyOldInvoice" Nope. -- John W. Vinson [MVP]
From: Bob Vance on 6 Apr 2010 21:58 Thanks John have tried using a query but I have no control over the text box,If I change columns to 0cm;5cm;4cm I do see the two names in I select the drop down arrow The Row Source is 18;Dobbie, Chris No Control Source In the code is : cbOwnerName.RowSourceType = "Value List" Thanks Bob "John W. Vinson" <jvinson(a)STOP_SPAM.WysardOfInfo.com> wrote in message news:vfgnr51mraqa3ql5evnod57flvq8f4bv4s(a)4ax.com... > On Wed, 7 Apr 2010 06:18:08 +1200, "Bob Vance" <rjvance(a)ihug.co.nz> wrote: > >>Thanks Jeff it does have a Value List, but what ever way I change it I can >>not get Dobbie, Chris Only Dobbie >>So I assumed it must be a code controlling the Combo Box! > > You assumed wrong. > > If you have a value list containing the text string "Dobbie" that's > exactly > what you'll get in the combo box. > > If the value list contains the string "Dobbie, Chris" you'll get that! > > I would recommend using a Query with a calculated field. My telepathy is a > bit > rusty, but assuming that you have a table of People with fields PersonID, > LastName and FirstName you could create a query > > SELECT PersonID, [LastName] & ", " & [FirstName] FROM PEOPLE ORDER BY > LastName, FirstName; > > (copy and paste this into the SQL window of a query and adjust the table > and > fieldnames to your own objects' names). Save the query and change the > combo's > row source type to Table/Query and reference the saved query. > > >>It would have nothing to do with the case that opens the Form would it? >> DoCmd.OpenForm "frmInvoiceClient", , , , , , "ModifyOldInvoice" > > Nope. > -- > > John W. Vinson [MVP]
From: John W. Vinson on 6 Apr 2010 23:58
On Wed, 7 Apr 2010 13:58:36 +1200, "Bob Vance" <rjvance(a)ihug.co.nz> wrote: >Thanks John have tried using a query but I have no control over the text >box,If I change columns to 0cm;5cm;4cm >I do see the two names in I select the drop down arrow Reread my message. You have a "Value List". That is wrong. You must change that from "Value List" to "Table/Query". You must also create the query (I hope that you have a table of names.... do you?) -- John W. Vinson [MVP] |