Combo box and can it feed two separate control sources

I have a combo box in a form, it draws it's information from a table with two 
fields, description and price. I can bind either one to a field (control 
source) in my form, but I wish to bind both fields i.e.description and price 
to two feilds on my form so when it puts the description into (lets call it 
field one) I want the price to go into a second field (lets call it field 
two) simultaneously.

I appologise if some of you have seen this question already   I did receive 
an e mail telling me I had a reply, on following the link  on the mail though 
it just came up with a blank page as did the link asking me if i needed to 
receive more replies so i am trying again.

Merv R

0
Utf
2/10/2008 12:25:01 PM
access.forms 6864 articles. 2 followers. Follow

2 Replies
642 Views

Similar Articles

[PageSpeed] 58

It's not possible to bind to more than one field. However, what you can do 
is bind it to one of the two fields (say Description), and add a text box 
that's bound to the other field (say Price). In the AfterUpdate event of the 
combo box, you can then populate the text box:

Private Sub MyComboBox_AfterUpdate()

  Me![Price] = Me.MyComboBox.Column(1)

End Sub

The above assumes that the price is the second column of the combo box (the 
Column collection starts numbering at 0)

-- 
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)


"Merv R" <MervR@discussions.microsoft.com> wrote in message 
news:EF11ABA1-EDB0-4233-990B-C0F4618A9E7C@microsoft.com...
>I have a combo box in a form, it draws it's information from a table with 
>two
> fields, description and price. I can bind either one to a field (control
> source) in my form, but I wish to bind both fields i.e.description and 
> price
> to two feilds on my form so when it puts the description into (lets call 
> it
> field one) I want the price to go into a second field (lets call it field
> two) simultaneously.
>
> I appologise if some of you have seen this question already   I did 
> receive
> an e mail telling me I had a reply, on following the link  on the mail 
> though
> it just came up with a blank page as did the link asking me if i needed to
> receive more replies so i am trying again.
>
> Merv R
> 


0
Douglas
2/10/2008 12:38:58 PM
Many Thanks Doug.

 God I'm thick, still took me about three attempts to get it right, that's 
how much I know about access, now works beautifully.

"Douglas J. Steele" wrote:

> It's not possible to bind to more than one field. However, what you can do 
> is bind it to one of the two fields (say Description), and add a text box 
> that's bound to the other field (say Price). In the AfterUpdate event of the 
> combo box, you can then populate the text box:
> 
> Private Sub MyComboBox_AfterUpdate()
> 
>   Me![Price] = Me.MyComboBox.Column(1)
> 
> End Sub
> 
> The above assumes that the price is the second column of the combo box (the 
> Column collection starts numbering at 0)
> 
> -- 
> Doug Steele, Microsoft Access MVP
> http://I.Am/DougSteele
> (no private e-mails, please)
> 
> 
> "Merv R" <MervR@discussions.microsoft.com> wrote in message 
> news:EF11ABA1-EDB0-4233-990B-C0F4618A9E7C@microsoft.com...
> >I have a combo box in a form, it draws it's information from a table with 
> >two
> > fields, description and price. I can bind either one to a field (control
> > source) in my form, but I wish to bind both fields i.e.description and 
> > price
> > to two feilds on my form so when it puts the description into (lets call 
> > it
> > field one) I want the price to go into a second field (lets call it field
> > two) simultaneously.
> >
> > I appologise if some of you have seen this question already   I did 
> > receive
> > an e mail telling me I had a reply, on following the link  on the mail 
> > though
> > it just came up with a blank page as did the link asking me if i needed to
> > receive more replies so i am trying again.
> >
> > Merv R
> > 
> 
> 
> 
0
Utf
2/11/2008 12:18:09 AM
Reply:

Similar Artilces:

Can you insert a picture into a specific cell?
Or do they only "float" on the page. Marc They float over the worksheet, but you can adjust the size so that it seems to fit a cell exactly. If you insert a picture, you can hold the alt-key down while you move/resize the picture. When it gets close to the edge of a cell, it'll snap-to that edge. Marc wrote: > > Or do they only "float" on the page. > > Marc -- Dave Peterson ...

Equation connecting two data quantities
Hi, I have data like this: in an excel sheet. Q C Equation 1 2 3 4 ; 22 44 34 55 88; ? Is there anyway that I can get an equation connecting these two quantities Q and C, (data arranged in this manner only, as I have lot of data where in I cant put that in two separate rows because of some constraints) Can I get a formula connecting these two variables in the quation cell. Thanks Assuming that the data fits a linear plot (and that you have a typo): read help on SLOPE and INTERCEPT If not linear; find how to draw a trendline; find trendline...

Can't insert Char(1) into SQL Server from Stored Procedure
Hello I am trying to insert a char(1) field into a table from an ASP.Net/C# application. At first I was inserting rows into the table but none of the columns that I was inserting the rows into were char(1) columns, they were mostly int and varchar columns. Then I found out that there was one column in the list that was not supposed to be an int column but instead it was supposed to be one of the char(1) columns into the table. So I replaced the int column in the list with the char(1) column and since the value of the char(1) column resulted from a CheckBox ('Y...

Trouble with Tab Control
I have a form in which i have a tab on it. The problem is the tab appears white and I would like to show the background behind it. I saw in the properties there was a section to make it "transparent" or "normal" i've selected botha nd nothing changes. Any ideas on how to solve this. thanks On Jan 25, 9:32 am, tsla...@gmail.com wrote: > I have a form in which i have a tab on it. The problem is the tab > appears white and I would like to show the background behind it. I > saw in the properties there was a section to make it "transparent" or > ...

Can E-mail recipient policy be linked to the OU membership?
Running Exchange 2003 (mixed mode) and Windows 2003 server (Windows 2000 mixed mode): I'd like to create a e-mail recipient policy that is linked to the different OU's that are created on the system. Is it possible to link the policy to a specific OU or do I need to create groups on the AD to control which recipients a policy applies to? Martin Moustgaard Yes, you can create a recipient policy that looks to just a specific OU. It is done through LDAP queries. Here are some references to articles and whitepapers that discuss how to work with recipient policies. 249299.KB.EN-US HO...

Can't open 2005 data file after reinstalling Money 2005
I am experiencing a recurring problem. I have had to reinstall Windows XP and MS Money 2005. I am now unable to open my previously converted 2005 file or restore any backup version. I consistently get the following error message: "Money cannot locate filename or cannot open it, possibly because it is a read-only file, you do not have permission to change it, or your disk drive is write- protected. If you have chosen the correct file and it cannot be accessed, you will need to click OK and then Restore your most recent backup file." Any help or thoughts would be greatly ap...

Transferring control of CClientDC to CDC
Hi, I have a class MSWinDisplayManager which I want to take a CClientDC device context so that it's member functions can perform drawing routines on it. I want the class to have it's own CClientDC member which all the methods have access to draw on. My constructor looks like this: MSWinDisplayManager::MSWinDisplayManager(CClientDC& win) { private_win.attach(win); } This is called by the user like: CClientDC dlg(this); MSWinDisplayManager wdm(dlg); then I want to do things like: wdm.drawCars(); The problem I have is that private_win isn't getting control of the device ...

open two different Access reports
Hi, I was wondering if i can get some help here. I have two different reports that i want to open when a user clicks a button to view the reports for printing. Is there any way of popping them up at the same time in VBA? Thank you in advance Associates wrote: >Hi, > >I was wondering if i can get some help here. I have two different reports >that i want to open when a user clicks a button to view the reports for >printing. Is there any way of popping them up at the same time in VBA? > >Thank you in advance Yes. Call the DoCmd.OpenReport command twic...

can i download lxce serv.exe
want to open message lxce serv.exe using windows xp ...

how many receivers i can add
i want to use outlook send 2000 thousands emails to 2000 peoples at the same time. can i put them all in the recivers and send them at one time? thank you for you help ...

Adding a combo box to a worksheet
Hi all, I'm re-creating one of our paper forms in Excel and I'd like to add combo boxes to some blanks on the form to allow the user to choose a name from a list. I know a little about Excel formulas and no VB code at all...what's the idiot-proof way to do this? Thanks, Chris Hi Chris, The easiest way is to right-click within Excel in the toolbars area and select the "Forms" toolbar. Then Forms toolbar should then appear and could can select the "Combo Box" icon and click on that. If you can't tell which icon represents the Combo Box, just hover yo...

How do I bind a XAML text box control to a dataset?
Hello; I am new to using WinFx and I am having trouble figuring out how to bind a text box to a field in a dataset. I found an MSDN article: http://msdn2.microsoft.com/en-us/library/ms752057.aspx My question deals with the text box code: <TextBlock Text="{Binding Path=ISBN}" Grid.Column="1" /> How does this text box know to bind to the field "ISBN" in "myDataSet"? How does the control implement the dataset? Thank you Monty ...

Creating Text Box in Publisher 2007 Crashes the Application
Hello, we have a clean install of Publisher 2007 under Windows XP SP2, and when we try to create a text box in a document, (both an existing document and a blank document), publisher crashes. Office is fully patched. I ran Office Diagnostics from the help menu and no problems were found and the issue persists. Any thoughts on how to resolve the issue? Thanks, Syd See if selecting a different printer as default helps. How to view error signatures if an Office program experiences a serious error and quits http://support.microsoft.com/kb/289508/en-us -- Mary Sauer MSFT MVP http://of...

With and import tool can you change only item description?
Is there a way to change only the item description on a large quanity of items. What about the extended description? Thanks for your help. Use the MS SQL Data Import Tool by EMS. $65.00. The QSImport Tool available to download from Microsoft will probably work but is not supported by Microsoft. Kinnard L. Kohler Business Machines Systems 6101 South Shackleford Road Little Rock, AR 72204-8606 (T) 501-375-8380 (F) 501-375-0043 (Cell) 501-412-5686 Email: kinnard@removebmsar.com "Lisa" wrote: > Is there a way to change only the item description on a large quanity of >...

Can i use conditional formating on a cell when it contains a formula?
I am trying a "conditional formatting" on a cell that contains formula, but it didn't work. "If cell value is equal to 0 then font - white" This doesn't work, stays always. If i use this condition on a cell without formula it works just fine. Thank -- si ----------------------------------------------------------------------- sit's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=262 View this thread: http://www.excelforum.com/showthread.php?threadid=26784 Hi are you sure your formula returns an exact zero?. Could you post the formul...

Indirect Method for Name Box Variable? #2
DARN The reason I want to do this is that I have to collect data on a dail basis but I have to display it on a graph on a weekly basis. I select the entire week of cells and give it a name like week52. The following week I have to select the entire week and name i week53. Everything is set up that I can just copy and the numbers will progres for whatever length of time I need to graph (months, years, etc) excep this. Maybe I'll just go back to using the range of cell numbers. Thanks guys -- Chris Brenna ----------------------------------------------------------------------- Chris Bre...

Can't configure Outlook Express
I had Outlook express set up for the Money newsgroup, but somehow I lost it. Now I even forgot how to set it up again. I always get the error message saying "server cannot be found". The server name I typed in was microsoft.public.money, and I am not sure what should I type in here Thanks for help In microsoft.public.money, wj wrote: >I had Outlook express set up for the Money newsgroup, but >somehow I lost it. Now I even forgot how to set it up >again. I always get the error message saying "server >cannot be found". The server name I typed in was &g...

Sizing drop down validation box
I have a form with lots of drop down validation boxes, many of them are Yes,No,N/A or Pass,Fail,N/A so one a narrow box is required but all the drop downs are about three inches wide. Once I accidentally go them to the right size and saved the file, closed it, then re-opened and the drop downs were really wide again. Does anyone know have to set the width, I always thought they were the same width as the cell they pop from but not the case. Wayman Those extra wide dropdown lists appear occasionally, usually if cells on the worksheet have been merged (not necessarily the cell with t...

Controlling NDR's sent to Originator
Hi, I have a scenario: An Exchange2k User sets up an Auto Forward Rule to forward all inbound mail to a personal email account. This person recieves email into his Inbox and the Rule fires off forwarding the email to their personal account. His personal account is not reachable and Exchange sends a NDR to the original sender. Example: Step 1: john23@example.com sends email to corpuser7@corp14.com Step 2: corpuser7@corp14.com has an Inbox rule that forwards this email to his personal account at homeacct@isporg.com Step 3: exchangeserver.corp14.com recieves an NDR from pubmailer.isporg.c...

Selecting the Right Text Alignment for a edit box doesn't work
When I select right text alignment in the edit control properties, the text is still left aligned when I run the program. What am I doing wrong Thanks Dan Dan, "Dan" <anonymous@discussions.microsoft.com> a �crit dans le message de news:DECFE605-A130-416B-9924-60BA0C79D684@microsoft.com... > When I select right text alignment in the edit control properties, the text is still left aligned when I run the program. What am I doing wrong? > I've no idea :-))) You can open your RC-file as text, and make sure it has the ES_RIGHT style set, thus: EDITTEXT IDC...

what printers can run Vista
just purchased a dell which came with Vista on it. now my printer (HP 5550 deskjet) won't print. I need to find a new printer that i can hook up to the computer. This is an Access newsgroup. We help with questions related to Microsoft Access - the database application that is part of MS Office Professional. -- Rick B "monroe" <monroe@discussions.microsoft.com> wrote in message news:AC746826-251A-4097-AF88-2805BCDE7DEC@microsoft.com... > just purchased a dell which came with Vista on it. now my printer (HP > 5550 > deskjet) won't print. I need to...

Adding blank "separator" Rows in a Pivot Table
Does anyone know how to insert blank rows into a pivot table (say, between groupings, etc.)? There has to be a way, since some of the various table formats that come with Excel include blank rows. Double-click the field button that you want to format Click Layout Add a checkmark to Insert blank line after each item Click OK, twice Bucko wrote: > Does anyone know how to insert blank rows into a pivot table (say, > between groupings, etc.)? There has to be a way, since some of the > various table formats that come with Excel include blank rows. -- Debra Dalgleish Contextures http...

Picture control on a form
What is the best way to fill a form with a picture control so that when the client window is resized the picture control will fill the form? -- Just Al Take a look at this and see if this is what you want: http://www.codeproject.com/dialog/bmpdlg01.asp Tom "Al" <Al@discussions.microsoft.com> wrote in message news:5BEA0FA2-3F95-4090-B908-A75DBF1D19DE@microsoft.com... > What is the best way to fill a form with a picture control so that when > the > client window is resized the picture control will fill the form? > -- > Just Al Thank You! -- Just Al &...

Determine a result of one column based on conditions in two column
Example Col A Col B Count the number of a's in Col B only when an x is in Col A x a x a Result should be 2 y a z p I can't figure it out x t x m Thanks try this =SUMPRODUCT(--(A2:A7="x"),--(B2:B7="a")) -- Hope this help Please click the Yes button below if this post have helped answer your needs Thank You cheers, francis "tel703" wrote: > Example > Col A Col B Count the number of a...

Recommendations Please: Software That Can Backup Outlook While It is Open/Running
As the subject says. There are lots of packages that will backup the pst, etc. once Outloook is closed, but some products claim to do it while Outlook is open. Any suggestions on products that actually do this and do it properly? If the product can safely backup over the network to a server and can do incremental/update backups throughout the day, I'd really like to hear about it. Thanks. ...