Linking form to a table

Techfi

New Member
Joined
Mar 4, 2003
Messages
33
i have a form for table A. One of the fields I will be filling in for table A. needs to be a value from field A on table B. How do i get the drop down to show that data?
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Have you tried the Combo Box Wizard? It should have everything you need (Data Source, Control Source) built in.
 
Upvote 0
Hey Techfi

All that is required here is a SQL statement that calls the data from TableB. To do this add the following to the Row Source space in the propertis window:

"SELECT FieldName from TableB ORDER BY FieldName" (Just add the correct field and Table names)

Dugantrains' post to use the Combo Box wizard will work just fine too. It pops up automatically when you add a combo box to a form.

Select option 1 "I want the combo box to look up values in a table or query" and select the table or query you are after (TableB in this case) and then select the Field you are after (FieldA here) and tada!!

anvil19
:eek:
 
Upvote 0
all i can get it to do is show the first column if the table i want.(there are only 2 columns in this table, and I want the second) I have the control source set for the column i want, i have the row source type set for table/query, and row source set to the table i want, what am i missing?
 
Upvote 0
Hi Techfi

What you are seeing is the entire table, but because your column count is 1 you only see the first field.

You must just add the SQL statement to the row source space, and leave the control source space empty.

anvil19
:eek: [/quote]
 
Upvote 0
Hi Techfi

What you are seeing is the entire table, but because your column count is 1 you only see the first field.

You must just add the SQL statement to the row source space, and leave the control source space empty.

anvil19
:eek:
 
Upvote 0

Forum statistics

Threads
1,221,586
Messages
6,160,646
Members
451,661
Latest member
hamdan17

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top