By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,454 Members | 3,208 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,454 IT Pros & Developers. It's quick & easy.

Problems with editing the VBA code - auto syntax check??

P: n/a
Hi!
I have problems with editing my VBA code. It is connected with some kind of
automatic-correction mechanism in Access which I cannot find. I turned off
Automatic Syntax Check in Options menu and it still is the same. The problem
is that when I try for example to write

Edit1.Value = Date()

Access changes it to Edit1.Value = Date

and there is nothing I can do about this. I've found some information that
it sometimes is connected to open form in access.. The funny thing is that
after I close the form and enter date() it changes to date and the form is
opened in Access!

HELP! I have been trying to enter date() for 30 minutes :)

Chris
Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
VBA has:
- a Date statement (read/write) for the system date;
- a Date() function (read only) for the system date.

Whenever you use the Date() function in code, VBA changes it into the Date
statement. It still works, so you just get used to this behavior.

You still need the Date() function for other contexts, e.g. in a query, or
in the Default Value of a control.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Krzysztof Bartosiewicz" <bb***@klub.chip.pl> wrote in message
news:d5**********@nemesis.news.tpi.pl...
Hi!
I have problems with editing my VBA code. It is connected with some kind
of automatic-correction mechanism in Access which I cannot find. I turned
off Automatic Syntax Check in Options menu and it still is the same. The
problem is that when I try for example to write

Edit1.Value = Date()

Access changes it to Edit1.Value = Date

and there is nothing I can do about this. I've found some information that
it sometimes is connected to open form in access.. The funny thing is that
after I close the form and enter date() it changes to date and the form is
opened in Access!

HELP! I have been trying to enter date() for 30 minutes :)

Chris

Nov 13 '05 #2

P: n/a
Thanks!
Chris
Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.