A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

. vs !



 
 
Thread Tools Display Modes
  #1  
Old August 20th, 2005, 08:37 AM
mark r
external usenet poster
 
Posts: n/a
Default . vs !

why does one work and the other not?


using . instead of !

using _ instead of # in fieldname#


DOESNOT WORK:
If IsNull(ME!mmm#) Then
Me.mmm# = Me!ssn
End IF

DOES WORK:
If IsNull(ME.mmm_) Then
Me.mmm_ = Me!ssn
End IF
  #2  
Old August 20th, 2005, 06:02 PM
Ken Snell [MVP]
external usenet poster
 
Posts: n/a
Default

Names with # in them must be surrounded by [ ] characters:

Me![mmm#]


This is true for any non-letter, non-number, and non-underscore characters.

--

Ken Snell
MS ACCESS MVP

"mark r" wrote in message
...
why does one work and the other not?


using . instead of !

using _ instead of # in fieldname#


DOESNOT WORK:
If IsNull(ME!mmm#) Then
Me.mmm# = Me!ssn
End IF

DOES WORK:
If IsNull(ME.mmm_) Then
Me.mmm_ = Me!ssn
End IF



  #3  
Old August 21st, 2005, 01:53 PM
Jeff Boyce
external usenet poster
 
Posts: n/a
Default

Mark

As I recall, the dot (".") refers to methods and properties internal to
Access, while the bang ("!") refers to objects created by the user.

Both might work in a situation where the system-created object has the same
name as a user-created object. For example, binding a form to a query or
table and adding, say, a text control to the form results in a textbox with
the same name as the underlying control. If you are referring to the
value/data, I believe you can use either dot or bang.

Regards

Jeff Boyce
Access MVP

"mark r" wrote in message
...
why does one work and the other not?


using . instead of !

using _ instead of # in fieldname#


DOESNOT WORK:
If IsNull(ME!mmm#) Then
Me.mmm# = Me!ssn
End IF

DOES WORK:
If IsNull(ME.mmm_) Then
Me.mmm_ = Me!ssn
End IF


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:52 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.