Value in linked tables

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have created a database where the tables are linked to an SQL database.
One of the reports I have created contains a field taken from the SQL
database and is called Status. When I run the report the Status field shows
1, 2 or 3. I want to replace this by either Pending, Granted or Abandoned. I
have tried to use the Switch expression but this results in a #Error in the
report. I can not change any of the fields in the SQL database. How do I
accomplish this.

Thank you
Marjo
 
It would help if you showed the expression that doesn't work and also the name
of the related control. However, guessing from the information you have supplied.

Make sure your control has a name different than the fields involved.

Control Name: txtStatus

Control Source: = SWITCH([Status]=1,"Pending",[Status]=2,"Granted",[Status]=3,"Abandoned")
 
Another alternative when using consecutive small numbers is an expression
like:
=Choose([Status],"Pending","Granted","Abandoned")


--
Duane Hookom
MS Access MVP


John Spencer (MVP) said:
It would help if you showed the expression that doesn't work and also the
name
of the related control. However, guessing from the information you have
supplied.

Make sure your control has a name different than the fields involved.

Control Name: txtStatus

Control Source: =
SWITCH([Status]=1,"Pending",[Status]=2,"Granted",[Status]=3,"Abandoned")
I have created a database where the tables are linked to an SQL database.
One of the reports I have created contains a field taken from the SQL
database and is called Status. When I run the report the Status field
shows
1, 2 or 3. I want to replace this by either Pending, Granted or
Abandoned. I
have tried to use the Switch expression but this results in a #Error in
the
report. I can not change any of the fields in the SQL database. How do I
accomplish this.

Thank you
Marjo
 
Back
Top