Pass username and password

J

Joe

I use the following code to open another Access database
and open a form, which has code, attached to the open
event. The code uses an update query to pull information
from the first database, and then runs a report that is
dependant on that update. My problem is that access
complains that the user does not have the necessary
permissions to run the update queries, is it possible to
pass user and password details to the second database
logon form from the first database code. I have tried
setting permissions to allow the updates in the second
tables security settings, without success.

Dim objAcc As New Access.
Set objAcc = GetObject("C:\Documents and
Settings\Joe\My Documents\Van
Run05.mdb", "access.application")
objAcc.UserControl = True
objAcc.DoCmd.OpenForm "frmfuelweek"
DoCmd.OpenForm "frminstruct", acNormal, "", "", ,
acNormal
 
B

Bill Taylor

Try setting the queries run permissions to owner's instead of user's. This
should work for you. Open the query in design mode and open the property
sheet, click in the area where the tables are and you will see the run
permissions property.
HTH
 

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