Do I need to use the name or the Control?

  • Thread starter Thread starter Dave Elliott
  • Start date Start date
D

Dave Elliott

Rate is a control, the other field is not bound
I am trying to use the messaage box if amounts do not match then msgbox, is
this syntax correct?
They both contain $ amounts

If [Rate] <> [Text430] Then
MsgBox "Rates Do Not Match, Are You Sure?"
End If
 
Not getting errors, but it shows the message no matter what value i change i
too?
Text430 is set to =[NameB].[Column](10) Format Currency
Rate is bound and format currency

Arvin Meyer said:
The controlname will usually suffice. If you are getting errors, try the
full syntax:

If Me.[Rate].Value <> Me.[Text430].Value Then

or:

If Forms!FormName![Rate].Value <> Forms!FormName![Text430].Value Then
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access

Dave Elliott said:
Rate is a control, the other field is not bound
I am trying to use the messaage box if amounts do not match then msgbox, is
this syntax correct?
They both contain $ amounts

If [Rate] <> [Text430] Then
MsgBox "Rates Do Not Match, Are You Sure?"
End If
 
Thanks so much, that did the trick

Van T. Dinh said:
Try

If Me.[Rate].Value <> CCur(Me.[Text430].Value) Then

--
HTH
Van T. Dinh
MVP (Access)


Dave Elliott said:
Not getting errors, but it shows the message no matter what value i
change i
too?
Text430 is set to =[NameB].[Column](10) Format Currency
Rate is bound and format currency
 
Back
Top