Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / May 2007

Tip: Looking for answers? Try searching our database.

Bound Column with additional view

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Don - 18 May 2007 17:12 GMT
I have a field in which I request the employee ID number. The combo box lists
the emplyee ID, their name, department, etc. When I select the employee of
choice, I have the employee ID as the bound column. Is there any way to
display, not save, any of the other fields available in the combo box? In
other words, I want to select employee John Doe and have his ID of 1234 saved
in the table, but on the form I want to see that 1234 is John Doe by having  
his name appear in a non-bound field next to it.

I will need a similar action to occur in the related report.

Signature

Thanks!

Don - 18 May 2007 17:28 GMT
FYI, I am using Access 2003
Signature

Thanks!

> I have a field in which I request the employee ID number. The combo box lists
> the emplyee ID, their name, department, etc. When I select the employee of
[quoted text clipped - 5 lines]
>
> I will need a similar action to occur in the related report.
John W. Vinson - 18 May 2007 18:46 GMT
>I have a field in which I request the employee ID number. The combo box lists
>the emplyee ID, their name, department, etc. When I select the employee of
[quoted text clipped - 3 lines]
>in the table, but on the form I want to see that 1234 is John Doe by having  
>his name appear in a non-bound field next to it.

Include all the fields that you want to see in the Combo's RowSource query,
and be sure the combo's ColumnCount property is big enough to include them
all.

Put textboxes on the form with Control Source like

=comboboxname.Column(n)

where n is the *zero based* index of the field you want to see.

>I will need a similar action to occur in the related report.

Base the Report, not on your Table, but on a query joining the table to the
employee table. That will give you all of the fields in both tables for
display as needed.

            John W. Vinson [MVP]
Don - 21 May 2007 22:49 GMT
John,
Thank you for the assistance. Not being an Access expert, I am afraid that
your response went over my head when you started talking about zero based
index.

In my form, I have a combo box with a control source of 'strAssigned',
wherein the  column count is set to 4, the bound column is 1 (strAnalystID),
and and the row source for the bound column is:

SELECT Reviewer.strAnalystID, Reviewer.strMRELastName,
Reviewer.strMREFirstName, Reviewer.strInitials FROM Reviewer ORDER BY
[strMRELastName];

Now, next to that I have attached a text box and given it a name of 'txtMRE'

For the new text box, e.g. txtMRE, I want to display the "strMRELastName"
from the 'Reviewer' table that correlates to the bound column of
'strAnalystID' so that people can see who belongs to the ID number that is
being stored.

In accordance with your instruction, I have assigned the new txtMRE a
control of
=Reviewer.strMRELastName

As you can see, I don't think that I did it correctly as all I get as a
result is #Name?
Signature

Thanks!

> >I have a field in which I request the employee ID number. The combo box lists
> >the emplyee ID, their name, department, etc. When I select the employee of
[quoted text clipped - 21 lines]
>
>              John W. Vinson [MVP]
John W. Vinson - 22 May 2007 00:28 GMT
>John,
>Thank you for the assistance. Not being an Access expert, I am afraid that
>your response went over my head when you started talking about zero based
>index.

Sorry... zero based just means that the first column is Column(0), the second
column is Column(1), and so on.

>In my form, I have a combo box with a control source of 'strAssigned',

What's the Name property of this combo box? That's what you need.

>wherein the  column count is set to 4, the bound column is 1 (strAnalystID),
>and and the row source for the bound column is:
[quoted text clipped - 13 lines]
>control of
>=Reviewer.strMRELastName

That doesn't in the least resemble what I suggested... <g>

If the combo box is named strAnalystID (which I hope it isn't... it's really
best to rename controls so that you can distinguish the fieldname from the
control name!) then you want

=strAnalystID.Column(1)

As an alternative, perhaps more beneficial for the user, you could base the
combo on a Query

SELECT Reviewer.strAnalystID, Reviewer.strMRELastName & ", " &
Reviewer.strMREFirstName & " " & Reviewer.strInitials FROM Reviewer ORDER BY
strMRELastName, strMREFirstName;

Set the Column Count to 2 (the ID and the concatenated full name) and
ColumnWidths to

0;1.25

to suppress the ID from view and display the full name; the bound column
should still be 1.

            John W. Vinson [MVP]
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.