Form Help

B

Brian T

Hi All,

I have a combo box to choose the Project Number (these are text format since
they alpha numeric) and I would like to automatically fill in the Project
Name in for use in a print report. I am using Access 2007. Any help with an
embedded macro would be great.

Thanks,
 
A

Al Campagna

Brian,
This is actually two questions... form vs report.
And no need for any code.
**Form:
Just add the ProjectName column to your combo box in the second
column.
ProjectNumber ProjectName

Bind the combo control to the ProjectNumber field
(you probably already do that)
Set up the combo this way...
No Of Columns = 2
Column Widths = 0" ; 1.5"
What this does is... allows you to select a project by ProjectName,
which is easier for users than knowing the ProjectNumber. The combo
will display that ProjectName... BUT... it really is storing the
ProjectNumber in the ProjectNumber field. It makes the combo do
"double duty." Save the ProjectNumber, but display the ProjectName.

**Report
Since you have the ProjectNumber value, then you just need to relate it
to the
ProjectName report's recordsource query.
--
hth
Al Campagna
Microsoft Access MVP 2007-2009
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."
 
B

Brian T

Al,

Thanks that helped.

Al Campagna said:
Brian,
This is actually two questions... form vs report.
And no need for any code.
**Form:
Just add the ProjectName column to your combo box in the second
column.
ProjectNumber ProjectName

Bind the combo control to the ProjectNumber field
(you probably already do that)
Set up the combo this way...
No Of Columns = 2
Column Widths = 0" ; 1.5"
What this does is... allows you to select a project by ProjectName,
which is easier for users than knowing the ProjectNumber. The combo
will display that ProjectName... BUT... it really is storing the
ProjectNumber in the ProjectNumber field. It makes the combo do
"double duty." Save the ProjectNumber, but display the ProjectName.

**Report
Since you have the ProjectNumber value, then you just need to relate it
to the
ProjectName report's recordsource query.
--
hth
Al Campagna
Microsoft Access MVP 2007-2009
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."




.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top