473,396 Members | 1,913 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

how to convert codes to names for printing of Access reports?

I have a data entry form that contains drop-down lists such as
'Assigned to:' with a list of staff member names. Those names end up as
numerical codes in the main table ('ProjectInfo') of the Access
database. Is there some way - such as a SQL satement added to a query
already set up in Access - to add a statement such as 'if 1 then
'Smith', if 2 then 'Brown', if 3 then 'Williams' ', and so on? That
would be an automated way to quickly get names, instead of numbers, to
appear in project status reports.

Otherwise, I have to use the more manual approach I'm using now, which
is to manually update a "linker table" called 'Project_Personnel' by
typing in the inserted values (inserted via use of a data entry form)
from 'ProjectInfo' into 'Project_Personnel'. For example,
'Project_Personnel', for each ProjectID, contains three numerical
fields: one for the code for the Director's name, one for the code for
the Program Manager's name, and one for the code for the Staff Person's
name.

This "linker table", Project_Personnel, links back to smaller tables
such as the one comprised of the list of names of Directors; the one
comprised of the list of names of Program Managers; and also, the one
comprised of the list of names of Staff Members. That's the way I'm
currently using to get names, rather than numbers, to appear in the
project status reports created in Access.

Nov 13 '05 #1
1 1506
km*******@hotmail.com wrote:
I have a data entry form that contains drop-down lists such as
'Assigned to:' with a list of staff member names. Those names end up as
numerical codes in the main table ('ProjectInfo') of the Access
database. Is there some way - such as a SQL satement added to a query
already set up in Access - to add a statement such as 'if 1 then
'Smith', if 2 then 'Brown', if 3 then 'Williams' ', and so on? That
would be an automated way to quickly get names, instead of numbers, to
appear in project status reports.

Otherwise, I have to use the more manual approach I'm using now, which
is to manually update a "linker table" called 'Project_Personnel' by
typing in the inserted values (inserted via use of a data entry form)
from 'ProjectInfo' into 'Project_Personnel'. For example,
'Project_Personnel', for each ProjectID, contains three numerical
fields: one for the code for the Director's name, one for the code for
the Program Manager's name, and one for the code for the Staff Person's
name.

This "linker table", Project_Personnel, links back to smaller tables
such as the one comprised of the list of names of Directors; the one
comprised of the list of names of Program Managers; and also, the one
comprised of the list of names of Staff Members. That's the way I'm
currently using to get names, rather than numbers, to appear in the
project status reports created in Access.


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Use the same ComboBox on the report as you use on the input form. After
copying it to the report change it's ControlSource to the corresponding
column name in the report's query.

You can copy the ComboBox from the form to the report:

1) Open form in design view - copy ComboBox (right click on control,
select copy).
2) Close form & open the report in design view.
3) Click the section you want to place the ComboBox & right click &
select Paste.
4) Move the ComboBox to the location you want.
5) Close & save the report.
--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQjIF0YechKqOuFEgEQKkoQCgrW7ucOUsiNABIypO7VB21O IcAqgAn3Aq
GomFPob4lqFzbVparvd07Kds
=dg4P
-----END PGP SIGNATURE-----
Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: John | last post by:
Hi all, I would like to use the Report building and printing capabilities of the MSAccess DB. I have a ASP.NET page which does calculations based on data in a MSSQL Server and once done will...
2
by: Sigurd Bruteig | last post by:
Hi all! I have a problem printing multiple reports. The code i use is: Dim stDocName As String stDocName = "rptInvoice" DoCmd.OpenReport stDocName, acNormal, , " = date()" The problem is that...
3
by: gudia | last post by:
I want to Programatically generate Access reports in the pdf format using some tool and then email them to people in the same code. Right now I am trying to do this with pdf995 using VBA (emailing...
10
by: John Smith | last post by:
Is there anyway to convert/export/copy an Access report into a Powerpoint slide? I know I can publish via Excel/Word but these remove formatting etc and therefore always require some degree of...
16
by: cyranoVR | last post by:
This is the approach I used to automate printing of Microsoft Access reports to PDF format i.e. unattended and without annoying "Save As..." dialogs, and - more importantly - without having to use...
11
by: IC_Clearly | last post by:
I'm running Server 2003 and wonder how well WTS works when printing an Access report to a client. Any suggestions would be appreciated. Thanks. IC
3
by: booner | last post by:
Is there any way to show an existing access database (.mdb) report inside a vb.net application? Any/all pointers much appreciated. BBB
3
by: charvi | last post by:
can i generate more than 1 excel sheets when a command button is clicked for eg i search for 2 names of audit dept and click print command button where records will be printed in excel again if i...
4
by: MLH | last post by:
How do I ensure my reports are being printed in max resolution of 1200dpi ? That is, can Access control the setting?
0
by: Qtip23 | last post by:
Hello All, So I have a my database information placed on a SharePoint site now that there is an immediate need for a web-based application in my division. I am able to print Access Reports...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.