#### Control Source Expression

Hi,

I am designing a form and want to have a control that displays First
Name and Last name from two fields.

I have just two controls on this form "Last Name" which I dragged
across from fields onto the from, and "Full Name" which is a text box
i created.

When I set the full name control source to :

=[Last Name]&[First Name]

But I get #Name?

The interesting thing is that =[Last Name] works, presumeably because
it is a control on the form, but =[First Name] doesnt?

What am I missing?

-Al


 0
BigAl
5/4/2007 4:13:15 AM
access 16762 articles. 3 followers.

5 Replies
1131 Views

Similar Articles

[PageSpeed] 59

Okay, I figurered it out, I have to set the forms record source to :

SELECT Customers.[Last Name], Customers.[First Name] FROM Customers;

so, from this I take it that a form cant refer to anything that isnt
declared in record source?

How would you then set a form to get a record from two tables?

-Al


 0
BigAl
5/4/2007 4:29:38 AM
Change the Name property of the control (on the Other tab of the properties
box.) Access gets confused if the control has the same Name a a field, but
is bound to something else.

If that doesn't work, check if the space in the name is correct.

Ultimately you will probably want to add a space between the 2 names, e.g.:
=[Last Name]& ", " + [First Name]

--
Allen Browne - Microsoft MVP.  Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

<BigAl.NZ@gmail.com> wrote in message
> Hi,
>
> I am designing a form and want to have a control that displays First
> Name and Last name from two fields.
>
> I have just two controls on this form "Last Name" which I dragged
> across from fields onto the from, and "Full Name" which is a text box
> i created.
>
> When I set the full name control source to :
>
> =[Last Name]&[First Name]
>
> But I get #Name?
>
> The interesting thing is that =[Last Name] works, presumeably because
> it is a control on the form, but =[First Name] doesnt?
>
> What am I missing?
>
> -Al


 0
Allen
5/4/2007 4:30:49 AM
<BigAl.NZ@gmail.com> wrote

> Okay, I figurered it out, I have to set
> the forms record source to :
>
> SELECT Customers.[Last Name], Customers.[First Name] FROM Customers;
>
> so, from this I take it that a form cant
> refer to anything that isnt declared in
> record source?
>
> How would you then set a form to get
> a record from two tables?

Use a Query for the Form's RecordSource rather than using a Table, with
multiple tables joined in the Query.  Read carefully the Help on "updateable
queries" -- often making a query updateable is as simple as being sure to
include the Primary Keys from both (or all) Tables in the Query.

If there is a one-to-many relationship between the two tables, you might use
a Subform, in which you have embedded a Form showing the Records from the
related (many side of the Relationship) Table.

Larry Linson
Microsoft Access MVP


 0
Larry
5/4/2007 5:08:38 AM
On May 4, 5:08 pm, "Larry Linson" <boun...@localhost.not> wrote:
> <BigAl...@gmail.com> wrote
>
>  > Okay, I figurered it out, I have to set
>  > the forms record source to :
>  >
>  > SELECT Customers.[Last Name], Customers.[First Name] FROM Customers;
>  >
>  > so, from this I take it that a form cant
>  > refer to anything that isnt declared in
>  > record source?
>  >
>  > How would you then set a form to get
>  > a record from two tables?
>
> Use a Query for the Form's RecordSource rather than using a Table, with
> multiple tables joined in the Query.  Read carefully the Help on "updateable
> queries" -- often making a query updateable is as simple as being sure to
> include the Primary Keys from both (or all) Tables in the Query.
>

Hmmm, interesting, you want to include both Primary keys, different to
including both related keys?

How does including both Primary Keys help? Can you explain a bit
more....

Cheers

-Al


 0
BigAl
5/5/2007 5:52:48 AM
<BigAl.NZ@gmail.com> wrote

> How does including both Primary Keys help?
> Can you explain a bit more....

No, I can't.  I was just perfectly happy, some years ago, to learn that many
update problems were easily avoided by ensuring that the PK of the table to
be updated was in the RecordSource. If a "why" was explained to me, at that
time, I don't remember it -- but there are a lot of internals items that
Microsoft has not chosen to make public.

Larry Linson
Miicrosoft Access MVP


 0
Larry
5/6/2007 2:19:44 AM

Similar Artilces:

Stock Control 02-19-08
Hi Iam really struggling with creating a stock control system on access. I have set up the table with all the info required these cover three tables, in stock, delievered stock and out stock I would like all these to add up and show me what I currently have in stock, but I am getting in a right muddle any help would be good, Thank you. If I can send you my tables by email I will so you can see what i have done Table 1 Currently In ProductID ProductName ProductDescription Serial Number Supplier UnitsInStock ReorderLevel Table 2 Delievered ProductID Date ProductName ProductDescription Del...

Hi All, I use an object of CListCtrl in my view. My problem is that whenevr it updates, it does it to the whole screen instead of doing it just to the last one. Can someone advise please? Regards I. Greg "Greg" <greg@triplebit.com> wrote in message news:%23P81h9M3DHA.540@tk2msftngp13.phx.gbl... > Hi All, > > I use an object of CListCtrl in my view. My problem is that whenevr it > updates, it does it to the whole screen instead of doing it just to the last > one. The last what? > Can someone advise please? > > Regards > > I. Greg > >...

I have found that others have had this issue but was unable to locate a definitive fix. The reproducible scenario is to add a new control to a form and then delete the controls label prior to saving the form. Once the label has been deleted, if I try to see the form in form view access crashes. Additional detail 1: If I save after adding the control, close the form, then open the form, then delete the label: No Problem. Additional detail 2: This occurs across several mdb's and several access installs (All installs from the same source and at the same SP level) Additional ...

Retrieving/Exporting cached email address in outlook express
Hello, A client of mine is trying to export all of their contacts from outlook express to whatever format. She can export all of her contact info, but she also wants all of the emails that she has cached in her system that are NOT contacts. Is there any way to do this? Thank you, Tom Tom Machado <tommahhh@hotmail.com> wrote: > A client of mine is trying to export all of their contacts from > outlook express to whatever format. She can export all of her contact > info, but she also wants all of the emails that she has cached in her > system that are NOT contacts. Is ther...

Disassociate existing macro from control key and execute by botton
I wish to change execution of a existing macro from a control key to a button. I do no want to rewrite the macro. I have assigned the macro to the button but the control key still has the capaibility of executing the macro. Trebor, If the control key is a shortcut (not assigned via the OnKey method), try this: Tools - Macro - Macros. Select your macro, click Options. Remove the shortcut letter from the box. OK -- Earl Kiosterud www.smokeylake.com "Trebor Retrac" <TreborRetrac@discussions.microsoft.com> wrote in message news:904F804C-3914-4079-ADC3-D1170A75955D@microsof...

Outlook express goes offline when click on different folder
My Outlook Express has developed a recent fault in that it goes offline when I switch between folder causing a great deal of frustration. I have checked with my ISP provider who say that it isnt them and also with BT who say that there is nothing wrong with the ISDN line which leaves the software. Has anyone else had a similar problem or is there a virus going around that can cause this.Look forward to any response. Thanks. Ask in an Outlook Express forum. This is an Microsoft Office Outlook forum. Outlook Express is family of Internet Explorer and Outlook of the Office family. Here...

In order to be able to continue working on a file over the holidays I emailed it from my work email to my home email. I zipped it down before I sent it as it was over 6.5Mb. When I got home and opened up my email I got the message "OE removed access to the following unsafe attachements in your mail ..."! Why does OE interfere with my mail? This has never happened before, what do I have to do to be able to pick up a zip file from my email? Go to Tools | Options, and then to the security page. Close to the middle of the page is a check box that deals with potentially unsafe...

This is a group to support Outlook from the Office group of programs. Outlook Express is a part of Internet Explorer and is a quite different program, despite its similar name.. You will probably get a faster and more expert answer if you post this to an Outlook Express news group. Try posting in one of these newsgroups: microsoft.public.windows.inetexplorer.ie5.outlookexpress for OE 5.x microsoft.public.windows.inetexplorer.ie55.outlookexpress for OE 5.5x microsoft.public.windows.inetexplorer.ie6_outlookexpress for OE 6.x microsoft.public.internet.outlookexpress.mac for OE for Macintosh If...

Outlook Express:
Can outlook express be set up to send an away mesage/vacation response. Any help is appreciated from anyone. "jason Pope" <mr_anderson1979@hotmail.com> wrote in message news:03dc01c3b3a4$432fa430$a501280a@phx.gbl... > Can outlook express be set up to send an away > mesage/vacation response. Any help is appreciated from > anyone. This newsgroup is for support of Outlook 97/98/2000/2002/2003 from the Office suite of products. Outlook Express is actually a separate program despite the similar name. For help with your OE questions, try an OE newsgroup such as ...

Uncompacting/Accessing Outlook Express Email
Before restoring my hard drive I compacted all my email folders thinking I was saving them. Now I have the files but cannot access them via Outlook Express. Any ideas I've tried everything. Should I have exported them? Too late? Thanks!!!!!!!! Compacted them in a zip-file? Uncompress them again and make sure the "Read Only" propery isn't checked. Then configure it with OE again. Note that this is an Microsoft Office Outlook forum. Outlook Express is family of Internet Explorer and Outlook of the Office family. Here is the link for the right forum http://commu...

windows 2000 outlook (not express) help function
At some point - probably in a service pack - I lost outlook help. The only thing that displays now is a page saying "What's new in Outlook 2000" and then a list of topics with the heading "What do you want to read about". I would llike to recover a normal help file with an index so that I can actually use the help function. I spent some time this morning trying to get outlook help for a "Vcard" - to no avail. Did MS really do away with the normal help function for outlook 2000 - or have I screwed something up? Any Help will be appreciated (no pun intended...

Creating 1 chart with 2 sources
I would like to create a chart based on the following scenarios: 1. If cell A1=B1, then the chart source is AA10:BB14 OR 2. if cell A1 is not equal to B1, then the chart source would be AA20:BB30 Is there a way where this could be easily done? Any help is greatly appreciated. Thank you! [This followup was posted to microsoft.public.excel.charting with an email copy to Maureen. Please use the newsgroup for further discussion.] You can do this easily with named formulas. Using AA:AC as an example (rather than AA:BB, which is 28 columns!): Create the named formulas below with Insert...

Update data source automatically
Hi, I hava a chart that shows progress in the project. The horizantal line represents the dates from the begining of the month to end(like 1 to 30) and vertical line represents the number of the items. I enter new data everyday based on progress in the project and I have to change the data source (Values of the series) everyday by one by. I have 6 series and I have to change all the series' value formula for example from J to K (Column J keeps yesterdays data and K keeps todays) the next day K to L ans so on. Is there any way to automate this prosess? I do not want to select from ...

TextBox control not enabled with protection on
This has weird behavior, so I am sure it is a bug. I am trying to auto-total table columns in a document template (not a VBA form). The fields are ActiveX textboxes and in VBA I simply assign them to integers and total; ie effectively adding the values in TextBox1, Textbox2 etc to total in TextBox9. Then I assign the "Filling in forms" protection to the document. It works fine and dandy in the template (dotm) that I am creating, but it all goes wrong when I create a docm from it (which is of course what I want the users to do). When you open up a document fro...

Outlook Express #131
I recieved this message when I tried to open an e-mail with an Excel worksheet "OE removed access to the following attachment" How can I change the settings to allow attachments to be downloaded? Many thanks for any help. dietrich(antispam)@htc.net ...

data validation not enforced with a named range source excel 2002 sp2
I have a cell with the following data validation settings that still allows any cell value inspite of the validation. The drop down list works, but is not enforced. How can I enforce this validation? Settings: Allow=List Ignore Blank=Yes In-cell dropdown=Yes Source="=Comment" (Comment is a named range) Input Message: Show message...=Yes Title and message entered. Error Alert: Show alert...=Yes Style=Stop Title and message entered. Source should be =Comment I don't know if that is what you have? -- Regards, Peo Sjoblom (No private emails please, for everyone'...

Error Message On Outlook Express #2
I recieve the following error message when trying to send mail out from Outlook Express. The mail doesn't send, but stays in my outbox. Error message is: An unknown error has occurred. Protocol: SMTP, Port: 0, Secure(SSL): No, Error Number: 0x800C0131 I've tried (numerous times) deleting Folders.dbx from the system, rebooting, deleting Folders.dbx with E-mail and virus protection off, but continue to get this error. I'm using Millenium Edition, have OE 6.00, use ACT! 2000... Any help to this most frustrating problem would be appreciated. Thank you. Michael Cagen This ...

MS Chart control axes limits
Hi, On trying to set high axes values for the MS Chart control, of about 500 the Visual Studio hangs for some time. It just does not accept anything above 1000 in resource editor mode. Is there any way to set such high values, I need values till about 10000? Also, does MS Chart control support things like moving average? TIA, Sucharit ...

Need Help Converting over to Outlook From Express
OK, I have been using OE for about 2-3 years now for my Email and Newsgroup reader. This past Christmas, I got a Pocket PC that came with Outlook 2002. I plan to use t to be able to keep track of my appointments and such but I would also like to use it as my new email reader. I also would like to use it for newsgroups, if that's possible. Is there a way that I can transfer all my settings, emails and newsgroup information over to Outlook or am I forced to just start from scratch? Thanks JTMcD OL has no Newsreader capability. In OL News is accessed via the OE newsreader as it is from...

tab control #2
Hi im developing ui framework in mfc. could you please tell me how to create non rectangular tab control? SunFire ...

Outlook Express 6 Spell Check error
Has anybody have any information for the problems listed bellow with the spell check issue with Outlook Express 6 with Windows XP??? Appreciate you help -Marc_ Spelling Command Is Not Available in Outlook Express for Windows XP 64-bit Edition View products that this article applies to. This article was previously published under Q308078 SYMPTOMS You may receive the following message when you perform a spelling check in Outlook Express 6 on Windows XP for the Itanium platform: An error occurred while the spelling was being checked. CAUSE This problem occurs because the proofing to...

Is it possible to use outlook express with exchange
Hi Is it possible to use outlook express with a NT4 exchange 5.5 server . , and how ? We have acounting software and every day all branches send the days takings via express , the software only works with express . So I have to use a dialup to retreive the days info. from an alternate isp I would be much easier and quicker to have it sent to express via our exchange server with a dedicated line . Or is there a way to send mail from oultook to express on the same PC . Thanks Leon wrote: > Hi > > Is it possible to use outlook express with a NT4 exchange 5.5 server > . , and how ...

Themed Tab Control Question
Hi all, I've read previous posts on Tab Controls using Windows Themed Controls, and I just wanted to confirm something: rather than try to force a colour on the user, I'm trying to adapt to whether or not Themed Controls are in use. Is it safe to assume that a Themed Tab Control in Access will *always* be white? Or is it possible in some fashion (using only standard Windows methods, for example, the Control Panel/Display and/or common API calls) to override that? Note: I don't need to account for funky 3rd-party software that may somehow be changing it, or anything of that...

Exchange 2K: Controlling incoming email formats....
Question... AFAIK (and correct me if I am wrong), Exchange natively only lets you control message formats for messages that are downloaded to POP\IMAP clients. For security reasons, I would like Exchange to convert all incoming\outgoing email from\to external domains, as well as INTRA-domain email , to plain text format. In other words, I do not want to see anymore html email on my server going in and out, just plain text. Is there a setting for this for Exchange to handle this natively? If not, what (if any) 3rd party solutions are out there for this? Thanks, George Here's the Re...

Outlook Express 6 #25
I have Windows XP and my outlook express is constantly freezing and shutting down...any suggestions? nanc <anonymous@discussions.microsoft.com> wrote: > I have Windows XP and my outlook express is constantly > freezing and shutting down...any suggestions? Yes. Ask Outlook Express questions in an Outlook Express newsgroup. -- Brian Tillman Smiths Aerospace 3290 Patterson Ave. SE, MS 1B3 Grand Rapids, MI 49512-1991 Brian.Tillman is the name, smiths-aerospace.com is the domain. I don't speak for Smiths, and Smiths doesn't speak for me. ...