Control Source for a combo box on a form

Hi

On my form, I use a combo box for teachers based on a separate table.

On my form, I want to be able to add the teacher name so I created a new 
combo box and use a lookup to attach it to the teachers table.

I can't get it to link the associated table for my form.

What am I doing wrong?

Thank you in advance.
0
Utf
12/12/2009 12:01:01 AM
access.forms 6864 articles. 2 followers. Follow

3 Replies
1134 Views

Similar Articles

[PageSpeed] 48

You can use 1 combo box and use the NotInList event to add the teacher. See 
my code at:

http://www.datastrat.com/Code/NotInListCode.txt

and a demo of how it works at:

http://www.accessmvp.com/Arvin/NotInListDemo.zip
-- 
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com


"forest8" <forest8@discussions.microsoft.com> wrote in message 
news:33378472-DAC5-4061-AA0E-072CAC4E5A9C@microsoft.com...
> Hi
>
> On my form, I use a combo box for teachers based on a separate table.
>
> On my form, I want to be able to add the teacher name so I created a new
> combo box and use a lookup to attach it to the teachers table.
>
> I can't get it to link the associated table for my form.
>
> What am I doing wrong?
>
> Thank you in advance. 


0
Arvin
12/12/2009 3:16:07 AM
Currently the table which feeds the form has the Teacher field.  When I try 
to choose Teacher for the source, it's not listed. but it does exist in the 
table.

"Arvin Meyer [MVP]" wrote:

> You can use 1 combo box and use the NotInList event to add the teacher. See 
> my code at:
> 
> http://www.datastrat.com/Code/NotInListCode.txt
> 
> and a demo of how it works at:
> 
> http://www.accessmvp.com/Arvin/NotInListDemo.zip
> -- 
> Arvin Meyer, MCP, MVP
> http://www.datastrat.com
> http://www.mvps.org/access
> http://www.accessmvp.com
> 
> 
> "forest8" <forest8@discussions.microsoft.com> wrote in message 
> news:33378472-DAC5-4061-AA0E-072CAC4E5A9C@microsoft.com...
> > Hi
> >
> > On my form, I use a combo box for teachers based on a separate table.
> >
> > On my form, I want to be able to add the teacher name so I created a new
> > combo box and use a lookup to attach it to the teachers table.
> >
> > I can't get it to link the associated table for my form.
> >
> > What am I doing wrong?
> >
> > Thank you in advance. 
> 
> 
> .
> 
0
Utf
12/12/2009 4:06:01 AM
Are you sure that the table is the recordsource of the form, and not a query 
which doesn't happen to include the field in question?

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



"forest8" <forest8@discussions.microsoft.com> wrote in message 
news:70F6A47A-4E38-4649-B14F-8467D4E891B2@microsoft.com...
> Currently the table which feeds the form has the Teacher field.  When I 
> try
> to choose Teacher for the source, it's not listed. but it does exist in 
> the
> table.
>
> "Arvin Meyer [MVP]" wrote:
>
>> You can use 1 combo box and use the NotInList event to add the teacher. 
>> See
>> my code at:
>>
>> http://www.datastrat.com/Code/NotInListCode.txt
>>
>> and a demo of how it works at:
>>
>> http://www.accessmvp.com/Arvin/NotInListDemo.zip
>> -- 
>> Arvin Meyer, MCP, MVP
>> http://www.datastrat.com
>> http://www.mvps.org/access
>> http://www.accessmvp.com
>>
>>
>> "forest8" <forest8@discussions.microsoft.com> wrote in message
>> news:33378472-DAC5-4061-AA0E-072CAC4E5A9C@microsoft.com...
>> > Hi
>> >
>> > On my form, I use a combo box for teachers based on a separate table.
>> >
>> > On my form, I want to be able to add the teacher name so I created a 
>> > new
>> > combo box and use a lookup to attach it to the teachers table.
>> >
>> > I can't get it to link the associated table for my form.
>> >
>> > What am I doing wrong?
>> >
>> > Thank you in advance.
>>
>>
>> .
>> 

0
Douglas
12/12/2009 1:52:27 PM
Reply:

Similar Artilces:

Lock Position Of User Form In VBA
Can Someone Help? Ron De Bruin and Jorge Rodrigues gave sone ideas on how to disable th "X" close button on a user form. However I now need to ensure that the User Form cant be moved down b holding on the program bar and sliding down, as this would revea critical data shown below. Is there a way to lock the position of the User Form? Thanks Celtic_Avenge -- Celtic_Avenge ----------------------------------------------------------------------- Celtic_Avenger's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1410 View this thread: http://www.excelforu...

bound control or inbound control
Hi Katherine, There are differences between using bound versus unbound controls. Where on the form do you want to use an unbound control? Jeanette Cunningham "Katherine" <Katherine@discussions.microsoft.com> wrote in message news:23BBC192-0A74-4B9F-9513-5E5923A76658@microsoft.com... > ...

why won't word 2007 release control of a .rtf file after exiting w
I AM HAVING TROUBLE WITH ACCESS TO RICH TEXT FILES BY PROGRAMS OTHER THAN WORD------ AFTER THE FILE OPEN IN WORD IS CLOSED AND EVEN AFTER WORD HAS BEEN SHUT DOWN (EXITED) ---------- I GET THE ERROR MESSAGE THAT THE FILE IS "IN USE" BY WORD WHEN (FOR EXAMPLE) AN ATTEMPT IS MADE TO DELETE IT ---- SOMETIMES WHEN RE-OPENING THE FILE AFTER RE-STARTING WORD THE FILE CANNOT BE SAVED BECAUSE IT IS IN "READ ONLY" MODE ------- AFTER MUCH FIDDLING AROUND I FINALLY MANAGED TO DELETE THE PROBLEM FILE ONLY TO HAVE THE SAME PROBLEM RETURN WITH A DIFFERNT FILE ----- WORD 200...

Sum of Services Provided Check Box
I have a check box on table: FLW You are to check as many services as was provided with this client on this contact. List of services: Outgoing Call Crisis Counseling in Person Therapy in Person Group Treatment Criminal Justice Support Assistance Filing Compensation Personal Advocacy SANE Follow-Up Financial Assistance Written Info Provided Legal Advocacy Other Follow-Up I have a query for date range. Then a report to print from the query per contact. My report for Services Provided gives me a 12 digit result. If an item is not checked it is represented by "0", if it is che...

cursor missing from form textboxes
I believe that I know 98% of the little intricacies of Publisher, but I'm stumped on this one. I created a website with a contact page and none of the standard textboxes will show a cursor to indicate with field you are in (I've even made the site live to double check). If you tab between textboxes, the tabbing works, as does typing, there is just no visual cursor to indicate where you are. If you click on the first textbox and type, all is good you can tab to the next box and type, and it's fine. I'd like to have the visual cursor show and can't get it. I also have ...

RE: Control
Can some one point me right direction to achive this following. Need to dispaly a data in a table format. some of the column data may have to display a image/icon based on a value from the table (1 :- Red color icon, 2:-yellow color icon...) Once the data is loaded and displayed on the format , able to search particular row by column index and update the values including the images(change different image). I tried with Listview control, with the report view I am not able to search row and update the columns with the List vew I am not able to show the image/icon. do not want to use ...

Split Form Size
I've created a split form but it I can't get it to save the size I resize it to. The height is off the bottom of the screen. Can someone enlighten me as to how I can size these forms to my liking? Thanks, James DoCmd.MoveSize works from the top and left of the Access window. The following example changes the active window height, but leaves its width unchanged: DoCmd.MoveSize , , , 2000 -- Arvin Meyer, MCP, MVP http://www.datastrat.com http://www.mvps.org/access http://www.accessmvp.com "JamesJ" <jjy@adelphia_darwin.net> wrote in message news:ud%236QegLIHA.3400...

Can Outlook put outgoing messages in my server's Out Box?
I set up Outlook for my Internet mail account & got it to leave copies of messages in the IN box on my Web Mail. What I would really like is if Outlook, in addition to maintaining it's own Sent Mail folder, could put the outgoing message in the Sent Mail box on my Web Mail. Can that be done? Thanx, -plh -- Where are we going and why am I in this HAND BASKET?? "plh" <plh_member@newsguy.com> wrote in message news:h7r5jr05c9@drn.newsguy.com... > I set up Outlook for my Internet mail account & got it to leave copies of > messages in the IN box on my Web Mai...

MSCRM login and the Users Control Panel
Is anyone aware of any way that the settings stored under Control Panel - Users - Password Management might interfere with the process of Single Sign On into MSCRM? It seemed to have somehow cached someones login and prevented logging in as the logged in user, until cached credentials had been "deleted". However I have never seen this mentioned as being relevant. I am not too sure what the architecture model is there, but it appears to be a single domain. If this area has any relevance, it would be useful to know....thanks ...

Adding a control variable
Hello all, Under VC++ 7.1, I've added a checkbox to a dialog. Using the dialog editor, I am not trying to add a control variable for this check box. However, when I right-click on the check box and select "Add Variable", the resulting wizard dialog does not allow me to select "Control Variable" (it is grayed out). What do I need to do to get a control variable for this check box added to my class? Thanks, Dave I've never seen that before - are you able to duplicate this problem with other projects too? -- Regards, Nish [VC++ MVP] "Dave" <bett...

Updating info from a form with query
I have a form with a user entered default value, which I have moved to a called form. This form then is to update a table. The problem is that it only updates when I actually change the data myself. What action must I take programmably to have the table info entered? I had a button on the form which I have save the form, but it gives me a "The command or action 'SaveRecord' isn't available now." I have even tried to set the focus to the controls which have the info to be saved to the table. Can anyone help? Thanks, Kurt -- learning by playing answered in &...

Spam control - MS Outlook
Hi! I am using MS Outlook 2000 and use 2 profiles. I recently installed a firewall package (Fsecure = Telia S�ker Surf), including Spam control. After install, MSO hangs and I cannot change to the other profile (if I not removed MSO by ctrl/alt/del) Somebody want to comment this? /Sven-Erik Intergrated AV/Spam is the cause of frequent issues in Outlook Is the FSecure you installed compatible with this old version of Outlook? "Storfille" <storfille@ebrev.net> wrote in message news:b1Ixm.11987$U5.164765@newsb.telia.net... > Hi! > > I am using MS Outlook 200...

Releasing memory after creating OCX control
Hi, I try to create an instance of an activex control in my MFC dialog based app. Though my application works with out any error, if i check the memory after calling "delete pMyControl" it keeps on occupying the same memory it occupied when the control was alive. Could anyone help me where I am missing to clear the memory? Thank you. My Code here ---------------m_pxWmp= new CWMPPlayer4();if( m_pxWmp->Create("replay", WS_CHILD | WS_BORDER | WS_VISIBLE , CRect(100, 100,320,240), this, 2)){ m_replay = true; m_pxWmp->SetUrl("C:\\video.avi"); m_pxWmp->Set...

Office 2007 forms
I am creating a form with office 2007, will those people who do not use office 2007 be able to fill in my form? should I save it in a particular format? thanks Provided you start from the normal template, don't use fonts that were introduced with Word 2007, and save the form in Word 97-2003 document format, anyone with Word 97 or later should be able to open it. Use only the legacy form fields, to which end http://gregmaxey.mvps.org/Classic%20Form%20Controls.htm will make things easier. -- <>>< ><<> ><<> <>>< ><<...

stock control system
trying to see up a 'basic stock control sytem' for a warehouse that contains building materials. -- Thank you. You can use multiple ways of doing, there's 3 ways to come to m head... 1) Use a worksheet as database an save all the information on the cell of that worksheet using some macros to access it and handle. 2) You might want to use Access instead of Excel, I think would b easier to handle the database portion and you still have the Macro available. 3) You can use VB with an Access to create an application -- fanay ------------------------------------------------------...

what control can display characters from txt files in a dialog?
I want to read lines from txt files and display them on a dialog.I wonder which control can be put into the dialog to hold the characters from txt? Something like :- while(m_file.ReadString(tmpstr)) { str += tmpstr; } m_edit.SetWindowText(str); -- Regards, Nish [VC++ MVP] "liao_xf" <sclxf@sina.com> wrote in message news:001401c3652f$177b9830$a001280a@phx.gbl... > Thanks first! > I know that Edit control can receive and edit input. > and I know the filestdio can read lines from txt. > but can you tell me how to attatch the lines to the edit? > Thanks!...

Exchange 2003 mail boxes
hi all, am encountering the following problem: In outlook (any version) when I open the address book and select any name then the properties then under "general" press "contacts" (or "personal address book" in the previous versions") and then select "activities" tab, it displays the e-mails of that name. I do not know how it is happening but it is there. Please help. Regards. Sounds like you have the Journalling feature of Outlook enabled. -- Mark Fugatt Exchange MVP http://www.exchangetrainer.com http://www.msexchange.org "Nazih Da...

Creating dialog controls at run-time
I've been researching how to do this, but whenever I try what other people do, I get very bad results. But my challenge doesn't end there. The number of controls I want to create is only known at run-time. The problems I face are manifold: 1. The code most people use fails badly. Not only is the font unconventionally big, but when I click the checkbox I create, the whole dialog disappears. If that's not enough, the pointer to the control is NULL when the dialog's destructor is called, so I can't delete the instance, and get a memory leak message when the program ends: CADi...

MDI support in ATL composite control
Hi, I have components created in ATL. The components are ATL composite controls. Entire work has been done till now using ATL, however I now need to give MDI type of work area (based o doc-view architecture) within the control. I have class derived from CMDIFrameWnd. However when I try to initialize instance of this class by calling "Create" method of CFrameWnd (base class in CMDIFrameWnd), I get error and creation fails. Tracing the code, I found that base class create method calls "AfxGetInstanceHandle" to get handle to the DLL. Now since this is ATL Composite control, ...

How to set form caption / text?
I use MFC Visual C++ 4.2. I am developing an application with main window and a few childs window. How to set each child window text / caption everytime I call DoModal? If I set "Entry Form" then the window I call will displayed with "Entry Form" caption. Thank you. You can use SetWindowText to set it. For a dialog, you should do it any time after its created(IOW, not in constructor). OnInitDialog and after is fine. -- Ajay "Landon" <Landon@discussions.microsoft.com> wrote in message news:F18C3988-E5F2-413E-8CCF-78143066DB29@microsoft.com... >I ...

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 ...

View Filtering and Access Controls for Business Units
I am trying to implement MS-CRM for my company. We have multiple Business Units . I need to give views to each Business Units so that they see only their own Contacts/Accounts/Opp lists. How do I accomplish this ? Also, If I gave inter business unit acesses , how do I make sure that the one business unit users can not modify any fields on other's Business Unit's records ? Thanks in advance for any help, Kishore This is quite easy to do with CRM. Assuming you have already created your Business Units in CRM, you can view a security role within one of the Business Units and a...

lost columns and in box
i have lost the suject and from coliumns - how do i getthem back plus all the mails in my inbox hsave disappeared wherte mihgjt they be hiding? thank peter Go to View | Current View and make sure it's set to Messages. The Messages view should have a Subject column and a From column, and it should not be "filtered" so all messages in the folder should appear when that view is selected. If they do not, or you are still missing the columns, go to View | Current View | Define Views, select the Messages view in the list, and click Reset. Then click the Apply View button and th...

using a check box to display text from a list
Excel 2003 I am trying to use a check box to display a category (Text) from a list in a cell and have tried code based on an "if structure" with no success. Has anyone got any suggestions. Roger W wrote: > Excel 2003 > I am trying to use a check box to display a category (Text) from a > list in a cell and have tried code based on an "if structure" with no > success. Has anyone got any suggestions. Hi Roger, Try to post the code you used, so we can suggest how to modify... -- Thanks in advance for your feedback. Ciao Franz Verga from Italy ...

Combo box and reports
I would like to use a combo box to show only the reports you want end users to view? Any suggestions? Create a table with the list of report names. Source of combo box is table. Damon "cwhitmore" <u32661@uwe> wrote in message news:6f84eca142199@uwe... >I would like to use a combo box to show only the reports you > want end users to view? Any suggestions? > On Wed, 21 Mar 2007 16:18:42 GMT, cwhitmore wrote: > I would like to use a combo box to show only the reports you > want end users to view? Any suggestions? Create a table ... "tblReports" ...