Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 2 / June 2007

Tip: Looking for answers? Try searching our database.

Concatenating in a form field

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Stahlhelm - 18 Jun 2007 12:04 GMT
I am relatively new to Access but wonder if someone can point me in the
right direction with a problem.

I am trying to create a control that has the value of a table field followed
by the word "account".

I have tried the following code as the control source:

       =[transactions]![account] & "Account"

This always displays #error.
The table and field names are perfectly correct but nothing I try will give
anything but either #error or #name? This is frustrating me as every website
I have tried suggests that this should work.

Please help me....thanks in advance
Douglas J. Steele - 18 Jun 2007 12:12 GMT
You can't refer to tables and fields like that.

If it's a bound form, and Account is a field in the underlying recordsource,
just use

=[Account] & " Account"

If it's not a bound form, or if Account is not a field in the underlying
recordsource, try using DLookup:

=DLookup("[Account]", "[Transactions]) & " Account"

Of course, this will only work if there's a single row in the Transaction
table (otherwise you won't have any way of controlling the row from which
DLookup gets the value of Account ), but then your original code suffers
from the same problem.

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

>I am relatively new to Access but wonder if someone can point me in the
>right direction with a problem.
[quoted text clipped - 12 lines]
>
> Please help me....thanks in advance
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.