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 / Forms / October 2007

Tip: Looking for answers? Try searching our database.

Access form textbox expression builder

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
KNIX - 31 Oct 2007 13:38 GMT
I have two fields in my db, one is a long integer, the other is text.   I
want to display them concatenated in a textbox on a form (i.e. intNumber & "
" & txtWords).   When I enter the expression in that way, I get "#Name?" as
an error.   I can't see that I'm doing anything wrong in the expression
builder (it doesn't give any issues when I close it, the error appears only
when I view the form in Form view).   Anyone know how I can get the integer
to appear as a string so it will live happily with the text?
Andy Hull - 31 Oct 2007 15:44 GMT
Hi

You need to add an equals sign at the beginning...

= intNumber & " " & txtWords

For your info, cstr(intNumber) would convert intNumber into a string but
Access will do the conversion automatically for you in this particular case.

hth

Andy Hull

> I have two fields in my db, one is a long integer, the other is text.   I
> want to display them concatenated in a textbox on a form (i.e. intNumber & "
[quoted text clipped - 3 lines]
> when I view the form in Form view).   Anyone know how I can get the integer
> to appear as a string so it will live happily with the text?
KNIX - 31 Oct 2007 16:35 GMT
Thanks, Andy.   I tried that, but it didin't work, however, it occurred to me
to try it in the underlying query, and just use the resulting field, and that
works fine.   Now, as to why it doesn't work in the source for a text box,
but will in the query builder, who knows.   Thanks agains.

> Hi
>
[quoted text clipped - 16 lines]
> > when I view the form in Form view).   Anyone know how I can get the integer
> > to appear as a string so it will live happily with the text?
 
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.