Kamis, 12 Desember 2013

RE: [MS_AccessPros] This is to reply to Glenn Lloyd's message (the reply button seems not to be working)

Phucon,

It would help if you included at least some of the previous messages in your posting so we wouldn't be confused by your posts. It seems this has been a fairly common occurrence lately. My brain really hurts when I attempt to remember stuff ;-)

A combo box can display multiple columns. For instance if a combo box is bound to EmployeeID but you want it to show Last Name and First Name, you can set the Row Source to something like:


SELECT EmployeeID, LastName & ", " & FirstName
FROM tblEmployees
ORDER BY LastName, FirstName

The bound column is 1 and the Column Widths are 0", 1.5".

If you really want to display the bound column with other columns, you can try something like:

SELECT EmployeeID, EmployeeID & " - " & LastName & ", " & FirstName
FROM tblEmployees
ORDER BY EmployeeID

The bound column is 1 and the Column Widths are 0", 2".

Duane Hookom MVP
MS Access

________________________________
> From: saigonf7q5@yahoo.com 
>
> Thank a lot Glenn.
>
> What I have been trying to do was perhaps a little fancy thing.
> Initially I was doing like what you advised, using the visible
> property. However, since the combo box can only display 1 column of
> data after it was updated, I then add a text box to concatenate the
> columns from the combo and placed the text box behind the combo, so
> after the data in the combo was selected, I make the combo box
> invisible and make the text box visible to display the concatenated
> information. And since the focus has moved away from the combo to the
> text box now, it triggers the error "2185 You can't reference a
> property or method for a control unless the control has the focus."
> So it's why I tried to see if Bring to Front and Send to Back…
>
> Thanks again
>
> Phucon

------------------------------------

Yahoo Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/MS_Access_Professionals/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/MS_Access_Professionals/join
(Yahoo! ID required)

<*> To change settings via email:
MS_Access_Professionals-digest@yahoogroups.com
MS_Access_Professionals-fullfeatured@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
MS_Access_Professionals-unsubscribe@yahoogroups.com

<*> Your use of Yahoo Groups is subject to:
http://info.yahoo.com/legal/us/yahoo/utos/terms/

Tidak ada komentar:

Posting Komentar