Control Source Property for TextBox

  • Thread starter Thread starter Public
  • Start date Start date
P

Public

Hi,
I have faced this problem a lot and I tried every possible solution with no
clue. I just want to bind a textbox to an expression and everytime I do so, I
realize that instead of showing the result of my expression, the textbox
shows #Name?. I have tried to eliminate any space and I even tried very
simple expression like this:
=DateDiff([m];"12/12/2007";"1/1/2008")
and even this was not sucessful.

Any clues?
Regards
 
Public,

Check Access help for properusage of datediff.

A couple thing i notice about you example are the following: argument
should be separated by commas, datediff takes a string as the format first
argument so it should be surrounded by quotes and dates should be surrounded
by pound signs like this:

=DateDiff("m", #12/12/2007#, #1/1/2008#)

HTH,
Josh
 
You're correct about the quotes around m and the # delimiters for the dates,
but semi-colons may be legitimate, depending on the user's Regional
Settings.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Joshua A. Booker said:
Public,

Check Access help for properusage of datediff.

A couple thing i notice about you example are the following: argument
should be separated by commas, datediff takes a string as the format first
argument so it should be surrounded by quotes and dates should be
surrounded by pound signs like this:

=DateDiff("m", #12/12/2007#, #1/1/2008#)

HTH,
Josh

Public said:
Hi,
I have faced this problem a lot and I tried every possible solution with
no
clue. I just want to bind a textbox to an expression and everytime I do
so, I
realize that instead of showing the result of my expression, the textbox
shows #Name?. I have tried to eliminate any space and I even tried very
simple expression like this:
=DateDiff([m];"12/12/2007";"1/1/2008")
and even this was not sucessful.

Any clues?
Regards
 
Thanks guys for your help.
I got passed from one problem and stuck with another.
The date thing is working correctly now.

However, I want to display a result of expression (query) in a textbox and
the query is not in the record set of the form niether I want to put it there
(since there is another query that the form is using).
I just want to display the result of a query in my textbox and I face the
same problem of #Name?
Any ideas?

Regards


Douglas J. Steele said:
You're correct about the quotes around m and the # delimiters for the dates,
but semi-colons may be legitimate, depending on the user's Regional
Settings.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Joshua A. Booker said:
Public,

Check Access help for properusage of datediff.

A couple thing i notice about you example are the following: argument
should be separated by commas, datediff takes a string as the format first
argument so it should be surrounded by quotes and dates should be
surrounded by pound signs like this:

=DateDiff("m", #12/12/2007#, #1/1/2008#)

HTH,
Josh

Public said:
Hi,
I have faced this problem a lot and I tried every possible solution with
no
clue. I just want to bind a textbox to an expression and everytime I do
so, I
realize that instead of showing the result of my expression, the textbox
shows #Name?. I have tried to eliminate any space and I even tried very
simple expression like this:
=DateDiff([m];"12/12/2007";"1/1/2008")
and even this was not sucessful.

Any clues?
Regards
 
Back
Top