INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Enter any text into Expression builder

Enter any text into Expression builder

(OP)
We have report that part of it is using an expression builder.
It is using a temp table to populate fields on the report. Part of it always puts the letter F after the [Pack Number]

=[Pack Number] & "/F"

Is there away I can get it so it allows a user to put another letter in rather than always F.

Any help please?

RE: Enter any text into Expression builder

Your report is based on a Record Source which could be a query with a column defined like:

AltLetter: Nz([Enter A Letter],"F")

When the query is run to populate the report, the user will be prompted to Enter A Letter. If they don't enter anything, the column will return "F". Otherwise the column will return the letter they type.

Duane
Hook'D on Access
MS Access MVP

RE: Enter any text into Expression builder

(OP)
HI

Sorry I do not understand your solution.

the record source is a temptable, how would apply your solution

RE: Enter any text into Expression builder

Change your report's record source to a query based on your temp table. You can then add the column I suggested:

CODE --> SQL

SELECT Nz([Enter A Letter],"F") as AltLetter, *
FROM [Your Temp Table Name]; 

Duane
Hook'D on Access
MS Access MVP

RE: Enter any text into Expression builder

(OP)
Hi

after abit more investigation I believe the report is using a query, this is the sql from it

SELECT Pack.Date, 1 AS [Pack Number], Pack.WONO, Pack.FP, Pack.W, Pack.T, Pack.L, Pack.PPP, Pack.R, Pack.Op, Pack.PI, Pack.S, Pack.Ex, Pack.TM, Pack.TP, [PPP]*[L] AS M, [M]*([w]/1000)*([t]/1000) AS V, [T] & "x" & [W] AS FS INTO Temp
FROM Pack
WHERE (((Pack.Date) Is Null));

This is called maketempquery.

Where would I insert your code for this to work?

Thanks

RE: Enter any text into Expression builder

Cpreston,
What you provided is an action query that creates a table named Temp. The record source of your report should be

CODE --> SQL

SELECT Nz([Enter A Letter],"F") as AltLetter, *
FROM [Temp]; 


In your report, change the text box control source to:

CODE --> ControlSource

=[Pack Number] & "/" & [AltLetter] 

Duane
Hook'D on Access
MS Access MVP

RE: Enter any text into Expression builder

(OP)
Hi

Sorry really do not understand, where do I actually put this

SELECT Nz([Enter A Letter],"F") as AltLetter, *
FROM [Temp];

Thanks

RE: Enter any text into Expression builder

You must go to your report design and find the Record Source property. It might have Temp at this point but needs to be changed to:

SELECT Nz([Enter A Letter],"F") as AltLetter, * FROM [Temp];

Duane
Hook'D on Access
MS Access MVP

RE: Enter any text into Expression builder

(OP)
Hi

Think I have it working, thanks for the help. Just getting the people using it to test it but appears to have done the job.

Cheers

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close