Yes, it is.
I go to try!!!
an
:
did you make the table?
** debug.print ***
debug.print strSQL
--> this prints a copy of the SQL statement to the debug window (CTRL-G)
After you execute your code, open the Debug window
CTRL-G to Goto the debuG window -- look at the SQL statement
If the SQL statement has an error
1. Make a new query (design view)
2. choose View, SQL from the menu
(or SQL from the toolbar, first icon)
3. cut the SQL statement from the debug window
(select, CTRL-X)
4. paste into the SQL window of the Query
(CTRL-V)
5. run ! from the SQL window
-- Access will tell you where the problem is in the SQL
Warm Regards,
Crystal
Access Basics
8-part free tutorial that covers essentials in Access
http://www.AccessMVP.com/strive4peace
*

have an awesome day

*
an wrote:
Thanks for your reply.
When debug run: Ok.
When form open return next error: CurrentDb.Execute strSQL
Thanks
an
:
Hi an,
you need to store the information somewhere -- for instance, in a table
or a database property. I will give you the solution for counting how
many times your main form is opened and store the result in a table.
make a table:
*Defaults*
NumMainOpen, number, long
put one record in the table with NumMainOpen = 0
then, on the Open event of f_main:
'~~~~~~~~~
dim strSQL as string
strSQL = "UPDATE Defaults " _
& " SET NumMainOpen = NumMainOpen + 1;"
currentdb.execute strSQL
'~~~~~~~~~
Warm Regards,
Crystal
Access Basics
8-part free tutorial that covers essentials in Access
http://www.AccessMVP.com/strive4peace
*

have an awesome day

*
an wrote:
Hi!
I would like to insert a counter, for exemple in F_Main, to count how many
times the DB was loaded.
Is it possible in Acc2k7, please?
Thanks in advance.
an