473,396 Members | 1,813 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Show related fields (from different table) in form

Hi All,

I have a Main form which has many different tables/Queries linked to it.
No problem to create individual field using combo box with pull down list.
How do I create 2 related fields in this form, ie: Person Initial, Person Name and have both automatically filled in?

Thanks
maili
Nov 9 '06 #1
4 5089
missinglinq
3,532 Expert 2GB
First you must have your form set up to display the record you want to retrieve, i.e. you must have fields set up with the appropriate Control Sources. Then simply:

Add a combo box to your form. The Combobox Wizard will pop up
Select "Find a record based on the value I selected in my combobox."
Hit Next.
Click on the field you're searching by to move it to the right side.
Hit Next.
Size the column appropriately.
Hit Next.
Name the combobox.
Hit Finish.

Now you can drop the combobox down and scroll down to the item to search by, or you can start to enter the item, and the combobox will "autofill" as you type.
Hit <Enter> and the record will be retrieved.
Nov 9 '06 #2
Hi,
Sorry I was not clear... I need to have 2 combo boxes in 2 different fields relating to
each other.
For example, person initial and person name: ml is maili.
The problem is when I created 2 combo boxes on the form, they popup individually;
how do I make them popup with the same value?

Thanks
maili
Nov 11 '06 #3
NeoPa
32,556 Expert Mod 16PB
Sorry, that's still not clear what you need to do here.
Nov 11 '06 #4
MMcCarthy
14,534 Expert Mod 8TB
Hi All,

I have a Main form which has many different tables/Queries linked to it.
No problem to create individual field using combo box with pull down list.
How do I create 2 related fields in this form, ie: Person Initial, Person Name and have both automatically filled in?

Thanks
maili
Maili

If your combo box has both these details in it's list then its easy; e.g. if first column (bound and hidden column) is set to an id field and second column to [Person Initial] and third column to [Person Name]. If the two textboxes are called txtPersonInitial and txtPersonName.

In the after update event of the combo box put the following:

Expand|Select|Wrap|Line Numbers
  1.  
  2. Private Sub ComboboxName_AfterUpdate()
  3.  
  4. Me.txtPersonInitial = Me.ComboboxName.Column(1) ' starts at 0
  5. Me.txtPersonName = Me.ComboboxName.Column(2)
  6.  
  7. End Sub
  8.  
Nov 12 '06 #5

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

Similar topics

3
by: Jason | last post by:
I am trying to filter records in a primary form based on records in related tables. The data in the related tables is being displayed in the primary form through subforms. To be more specific, I...
0
by: elvin | last post by:
Okay - apologize in advance for the length, but I want to make sure all you knowledgeable and helpful people have all the details you need to hopefully point my newbie rear in the right direction....
15
by: Paul T. Rong | last post by:
Hi everybody, This time a very very difficult case: I have a table "tblStudent", there are 50 students, I also made a form "frmStudent" based on "tblStudent", now if I don't want to show all...
1
by: Galka | last post by:
Hello I have a form to enter names and some other personal information. When a name is entered, it is checked against existing records: maybe, such name was entered before? If yes, user is...
3
by: MLH | last post by:
Generally, I do not monkey with renaming controls on forms whose name, by default, matches the name of their related table fields. But I noticed the following today If IsNull(Me!VColor) Then...
1
by: David | last post by:
Hi, I have an MS Access app which lets me create a new product by copying data from another selected product. All works fine, except one of the copy updates which I cannot fathom. The code...
3
Fifer
by: Fifer | last post by:
I have a table with 2 fields "system" and "subsystem" I would like to show the recordsets in a form with the system field showing only one time but all of the related subsystem fields shown on the...
16
by: DAHMB | last post by:
I am not sure if I worded my question correctly. But what I want to do is run a report from two related tables as follows: The first table is called Category - it has one field, called...
4
by: jbrumbau | last post by:
Hello, I have been successfully using a database I've created for several months to populate an equipment list for a project we've been working on. However, the form has recently stopped working...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
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,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.