UtterAccess.com
We have detected that you are using an unsupported web browser. We recommend you to upgrade your web browser to get the most from UtterAccess forums.
Why should and how can I upgrade?
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> #name? In Form Header, Access 2013    
 
   
Quijenoth
post Oct 5 2013, 07:16 PM
Post #1

New Member
Posts: 10



Hi all,
I have been building a customer Database and am in the process of creating the forms...
I have a query that takes the [FileNumber] [FirstName] and [LastName] from the ClientTbl and combines it into one field called [ClientName].
[ClientName] Format is
ClientName: [FileNumber] & " - " & [FirstName] & " " & [LastName]
When I build this into a form it displays perfectly fine but if I move [ClientName] to the header of the form instead It displays #Name?.
Heres the strange thing. when I edit the form and add a duplicate [ClientName] the [ClientName] in the header displays properly. If I then save and exit the database, the next time I load it the [ClientName] in the main form works but the Header [ClientName] once again displays #Name?
Any ideas why this is happening ?
Go to the top of the page
 
+
theDBguy
post Oct 5 2013, 09:00 PM
Post #2

Access Wiki and Forums Moderator
Posts: 58,417
From: SoCal, USA



Hi,
welcome2UA.gif
Can you post a zip copy of your db with test data only?
Go to the top of the page
 
+
Dave Elliott
post Oct 5 2013, 11:27 PM
Post #3

Banned
Posts: 1,269



Just use your code you have put together and put into a TextBox on your form in the body.You can even make it invisible.
Example: you add a TextBox on your form in the Detail Section named txtClient and then set it's control source to ClientName, assuming the form is based on this qry.
Then on your form Header create a TextBox and set it's control source to txtClient.
You could also modify it a little. Just modify as you wish.
=IIf(Nz([FName] & " " & [LastName])="","Untitled",[FName] & " " & [LastName])
HTH
Go to the top of the page
 
+
Quijenoth
post Oct 6 2013, 05:26 AM
Post #4

New Member
Posts: 10



Hi guys thanks for the replies.
o this is getting stranger.
Firstly I copied my database to edit the text with dummy values to post (Figured this will be some work but worth it as I'm planning on experimenting with elements of access I've never used before so may need plenty of expert advice from you guys <)
Ocopied it to the same directory as my original and opened up the copy in access - this is the strange part - the [ClientName] Field is working perfectly fine!
I wondered if it might have been because I shut down my PC after about a week of it being on last night so I opened my original - it didn't work just like last night
So I have the dummy data entered and decided to give Shazaams theory a try. I created a field called [ClientFullName] and set its control to [ClientName] Placed [ClientFullName] into the header, closed and saved the form and ran it again - it didn't work
I'm putting it down to a corrupt version currently since the new version is working fine - will let you know if this problem raises its ugly head again.
Unfortunately My database has a few images imbedded which makes it too large for the 2 mb file upload limit on the site but I can happily email it to those who would dedicate their own precious time to my cause <
Go to the top of the page
 
+
theDBguy
post Oct 6 2013, 09:35 PM
Post #5

Access Wiki and Forums Moderator
Posts: 58,417
From: SoCal, USA



Hi,
've been known to do that sometimes. You can send it to my GMail account, if you still need help.
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Search  ·  Go to Top  ·  Lo-Fi Version Time is now: 23rd October 2014 - 04:16 PM