look up help (1 Viewer)

Esther Avery

New member
Local time
Today, 22:29
Joined
Dec 12, 2012
Messages
7
Can anyone help me with a look up - I need to show two columns but I can only see the first one in my table, although two show when I go to the drop down!
 

Esther Avery

New member
Local time
Today, 22:29
Joined
Dec 12, 2012
Messages
7
Thanks - I looked at the combo boxes and I can see the correct example but I can't see how you showed two columns - I don't know where to change it in the Lookup field properties!?
 

Severin

Snr. Developer
Local time
Today, 14:29
Joined
Mar 27, 2012
Messages
172
When you click on the combobox in question all relevant code is showed in the box on the right!~)

The trick to that specific combo is to have a field in your query that combines the 2 columns. Then you set the column width to a very small number. Access doesn't show columns in the dropdown if they are to "thin" but if it's the first column that's not 0 then it will be used to fill the textfield.
 

Esther Avery

New member
Local time
Today, 22:29
Joined
Dec 12, 2012
Messages
7
Thanks - I worked out how to see the field properties after I had sent the post! I still cant get it to display both fields -I am building a new table, not a query, I have tried changing the widths but it doesn't change what I can see!?
 

Esther Avery

New member
Local time
Today, 22:29
Joined
Dec 12, 2012
Messages
7
I am using a table/query row source type SELECT [Food Fact Sheets].[Title], [Food Fact Sheets].[Next review due] FROM [Food Fact Sheets]; Bound Column 2 column count 2
 

Severin

Snr. Developer
Local time
Today, 14:29
Joined
Mar 27, 2012
Messages
172
SELECT [Food Fact Sheets].[Title] & " " & [Food Fact Sheets].[Next review due] as NewColumn, [Food Fact Sheets].[Title], [Food Fact Sheets].[Next review due] FROM [Food Fact Sheets]; Bound Column 3 column count 3 and column widths: 0.01;2;2
 

Esther Avery

New member
Local time
Today, 22:29
Joined
Dec 12, 2012
Messages
7
I think I am nearly there

I have put SELECT NewColumn, [Food Fact Sheets].[Title], [Food Fact Sheets].[Next review due] FROM [Food Fact Sheets];

is that right?

It is now asking me for parameter value for Newcolumn - is that &""&?

I wasn't sure about this part:

SELECT [Food Fact Sheets].[Title] & " " & [Food Fact Sheets].[Next review due]

I am desperate to sort this today so thanks for all of your help!
 

Severin

Snr. Developer
Local time
Today, 14:29
Joined
Mar 27, 2012
Messages
172
This should be right:

SELECT [Food Fact Sheets].[Title] & " " & [Food Fact Sheets].[Next review due] as NewColumn, [Food Fact Sheets].[Title], [Food Fact Sheets].[Next review due] FROM [Food Fact Sheets];
 

Users who are viewing this thread

Top Bottom