Permission Denied

A

Arturo

I have a group of Sales Mangers that are using an Access 2003 program. The
main database (the front-end) is linked to a file (the back-end) in the same
folder on their computer. They are using laptops at remote locations which
are on a VPN with a firewall. When completing a session, the computer runs a
script that sends the back-end file to an FTP site and downloads one back,
which has empty tables that will allow them to start the process all over. We
had to download the free NCFTP to allow these scripts to get through the
firewall.

I use the newly downloaded file to make updates to their program. There is a
shortcut to this file on their desktop. Upon opening this file, the Autoexec
macro will copy new forms, queries, etc. to their front-end database. The
opening form then gives them the option to start a new session or cancel out.

When starting a new session, this is what happens. They choose the option to
start the new session. That file closes and activates a VBS script. This
script opens the front-end database. There they have an option that begins
the session. After my first update was installed using this method (I
replaced 2 forms, 1 query, and added a new query), an error message would pop
up and I would get the Debug screen. The message is “Permission Denied.â€

I have worked with the IT guy to get around this. He can log in as
Administrator and has no problem. Yet, when the user logs on, he/she will get
the message. Any ideas what is happening?

Thank you.
 
A

Arturo

(Follow-up on the prior question)

When the debug option is chosen, the code goes to the line in the following
code that says "Date = DateValue(Now())"

Private Sub btnTodaysCallList_Click()

Application.Echo False, ""
DoCmd.SetWarnings False
DoCmd.Hourglass True
Status = "IS"
Date = DateValue(Now())
Logon = "N"

I used to get this message on some users computers, but found out through
this forum that I could load three references and it would work. Could
references be a problem again?

Thank you.
 
M

MikeJohnB

One thought here, Date is a reserved word and therefore shouldn't be used as
a variable?????? Perhaps try something like Datvar = DateValue(Now()) (Now()
Will give date and time tho. Date() will give just the date but perhaps you
need the addition of a time stamp on your date???
 
K

Klatuu

Date is a reserved word and should not be used as the name for anything.

Date = DateValue(Now()) makes no sense.

The VBA function Date would be the equivilent.
The Difference between Date and Now is that Now contains a specific time
down to the second. Date returns the Current date, but the Time portion is
always midnight.
 
J

John W. Vinson

(Follow-up on the prior question)

When the debug option is chosen, the code goes to the line in the following
code that says "Date = DateValue(Now())"

Private Sub btnTodaysCallList_Click()

Application.Echo False, ""
DoCmd.SetWarnings False
DoCmd.Hourglass True
Status = "IS"
Date = DateValue(Now())
Logon = "N"

You REALLY need to put Option Explicit at the top of (all of your) module(s)
and Dim your variables. I suspect that it's objecting because you have the
builtin Date function on the left of the = sign; Date is a reserved word and
Access will indeed object.

I take it you're using DateValue(Now()) because there's a problem (reference
missing) using the simpler Date() function call???
 
A

Arturo

Thanks to everybody that answered. I changed the field name and that fixed
the problem.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top