Originally Posted by
Imdabaum
I think you can just add them in the Select statement
If you are using the query designer Expr1: [prompt1]
If you are writing your own SQL then SELECT [prompt] as Expr1 where Expr1 is obviously something more meaningful to you.
You should be able to do something like this.
[vba]
PARAMETERS Name Text ( 255 ), DOB DateTime, Message Text ( 255 );
SELECT [Name] AS Name, [DOB] AS DOB, [Message] AS [Note];
[/vba] Then bind your report controls to the data sources.
Enjoy.
Thanks for your help. However, I'm still stuck so I'm going to share more information. I have two queries:
MadIDQuery(sql view):
SELECT DISTINCT mad_MadEntity.MadNumber, mad_MadEntity.MadName, dcs_Roles.RoleId, dcs_Users.UserId, dcs_Roles.RoleTypeId, mad_MadIndividual.IndividualFirstName, mad_MadIndividual.IndividualLastName, mad_MadIndividual.AddressLine1Text, mad_MadIndividual.AddressLine2Text, mad_MadIndividual.CityName, mad_MadIndividual.ProvinceStateText INTO MADIDQueryresults1
FROM ((mad_MadEntity LEFT JOIN dcs_Roles ON mad_MadEntity.MadNumber=dcs_Roles.MadNumber) LEFT JOIN dcs_Users ON dcs_Roles.UserId=dcs_Users.UserId) LEFT JOIN mad_MadIndividual ON dcs_Users.MadIndividualNumber=mad_MadIndividual.MadNumber
WHERE (((mad_MadEntity.MadNumber)=[Enter Mad ID]) AND ((dcs_Roles.RoleTypeId)=1));
and
ExchangeIDQuery:
SELECT dbo_Exchanges.Province, dbo_Exchanges.[Name edited], mad_MadEntity.MadName, dbo_Exchanges.ExchangeID
FROM dbo_Exchanges INNER JOIN mad_MadEntity ON dbo_Exchanges.[ILEC MAD] = mad_MadEntity.MadNumber
WHERE (((dbo_Exchanges.ExchangeID)=[Enter Exchange ID]));
My report is 'Generated Report'.
I need to prompt my user for two values(building a form for this, that part is done).
My MadIDQuery(and eventually my ExchangeIDQuery) does a Make-Table that outputs as 'MadIDQueryresults'.
I need values(like mad_MadEntity.MadName) to populate a a text box from 'MadIDQueryResults'(name text1 for simplicity) in my report. However, when I set the Control Source to, =[MADIDQueryresults1]![MadName] and view my report I simply see "#Name?"
I hope some of this made sense. I'm really quite stuck at this point.
Thanks for all your help so far.