Pass username and password

  • Thread starter Thread starter Joe
  • Start date Start date
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
 
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
 
Back
Top