473,714 Members | 2,169 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Filtering in a drop down box and automatically reference a company from previous form

1 New Member

Very new to access and am having a few issues with my database if anyone could help it would be appreciated. Its a contact database and set up in the following way:

I have a table for company information with details such as registered address, telephone numbers etc.

Then I have a contact table which has a list of contact information such as name email address etc.

I want the contacts to be linked to the company, the way it is set up at the moment is I have a company form which allows you to add new companies or edit existing companies. on this form there is a button which opens up a contact form. At the moment on the form is a box for company name this is set as a drop down box but you can start typing the company name in. I have 2 questions regarding this box:

1) can I set it so this box automatically references the company from which the form opened up from for example if I have just added or edited a company called "test123" when I click the button to add new contact the company "test123" is already set as the company to which I want to link the contact information to.

2) if I cant do the above I can select the company from the drop down box however the drop down box doesn't appear to be showing the full list of companies. for example if I have 2 companies 1 called "Example Belgium" and the other is called "Example UK Ltd" when I scroll down the list it only shows "example Belgium" if I start typing in the box (which starts to filter the list and I type "example U" it then shows "example UK Ltd" so it is obviously in the list I just cant work out why it isn't showing in the first instance.

As I mentioned I'm new to access to tried to ask the question in basic terms so I can understand but if I've left something out or you need more information please ask.

Any help would be greatly appreciated.
Jan 21 '16 #1
1 854
Seth Schrock
2,965 Recognized Expert Specialist
In your contacts form's OnLoad event, set the value of your Company combo box to the value on your other form. To get the value from a control on another form, the syntax is
Expand|Select|Wrap|Line Numbers
  1. Forms!form_name!control_name
Jan 22 '16 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

by: Ben | last post by:
I have two drop down box's in a form, how would I go about changing the options of the seccond one depending on what option is selected in the first one? For example, if there's a drop down box with "a", "b" and "c" as the options, and another drop down box with "1", "2" and "3" as the options; then when you select "a" on the first drop down box the values of the seccond one changes to "a1", "a2" and "a3". This should work for all the...
by: R-D-C | last post by:
Hi, got a drop-down list on a windows form in VS.NET2003. In the form load when NOT a postback, we add four values to the drop-down list. These appear in Internet Explorer. When you click a button on the form, the value selected in the drop-down is supposed to be put in a label's Text property. However, when you click the button, the page refreshes and all of the values from the drop-down list are
by: Vigneshwar Pilli via DotNetMonster.com | last post by:
string connectionString1 = "server=(local); user=sa;password=sa; database=sonic"; System.Data.SqlClient.SqlConnection dbConnection1 = new System.Data.SqlClient.SqlConnection(connectionString1); System.Data.SqlClient.SqlCommand dbCommand1 = new System.Data.SqlClient.SqlCommand();
by: Kaland | last post by:
Do the search engines follow links that are within forms (like the drop-down menu) so that those pages are indexed? Here is the code for a sample drop-down menu that I created. <form><select name="menu" style="font-family:'Calligrapher';color:#993333;background-color:#FFFFFF;font-size:10pt;"><option value="http://www.localwebsolutions.com/local-business-marketing-online.html">Marketing Online</option><option...
by: aman909 | last post by:
I have two tables, one called customers and the other called products. I would like to create a form called orders. On here what i would like to do, is a drop down list for the customer ID. When the customer ID is selected the rest of the fields get filled in with the correct details. So their firstname, lastname, address etc get put into the fields. Same for products as well. How do i do this?
by: printline | last post by:
Hello All I need some help in a form i'm creating. I have to fields with drop down select boxes. What i want to do is, when a user selects a given value in one drop down, the other drop down should atumatically change to another value. Ex: the user choses the number "4" in one box, then the other box should change to "4 WD". Here is my code: <select name="job___num_layers"...
by: micky125 | last post by:
Lo all, this probably sounds fairly easy but the problem i am having is that I want on the input details form to access mySQL to populate a select menu. This will allow me to link the input data from the user to a previous time without them having to type in an exact match in case it wrong. I would like the select menu to use an input from that screen, the project name, to limit the number of select options. Any help much appreciated!
by: SiddharthKarnik | last post by:
I have customer ID feild in the Customer master table made in oracle which i am filling with an html form. Now i want to make another html form with the same feild but with a dropdown menu box which should contain the customer ids inserted in the customer master as a drop down list. If i insert a new customer id in the customer master form then that should also reflect in the drop down list of some other form... thank you
by: virtualweb | last post by:
Hello; I never coded in javascript but I taught myself perl through books and tutorials and found many similarities. This helped me modify a free downloadable javascript snippet of code from a website and do the nessessary changes to adapt it to my needs. http://javascript.internet.com/forms/country-state-drop-down.html I need a drop down menu for a registration form where people select states from a menu and automatically will load...
by: jegsay | last post by:
Hi Great Minds, Please I need help on a php code that allows me to auto populate another dropdown menu based on the selection in the previous dropdown. Thanks.
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.