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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
. 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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|