code insisible not working

John thomas

Registered User.
Local time
Today, 03:55
Joined
Sep 4, 2012
Messages
206
I have a form that has a on click event t0 run code to make it inviisible but it will not work .I am using Access 2010
Option Compare Database
Option Explicit

Private Sub ok_Click()
Me.Visible = False
DoCmd.OpenQuery "show customers order", acViewNormal, acEdit
DoCmd.Close acForm, "show customer orders Form"
End Sub
 
Hi Thanks for the reply
I am new to Access dont know what you mean by trusted locations
 
Hi i have had a look at trusted locations seems a bit daunting .Why would this couse my prolem and what folders would i be looking for
 
Thanks Rural Guy
I will try this tomorrow when I have tw..o computers on the go so I can follow the pictures .Is There something that access does not like about this code
 
Code does not work unless you are in a Trusted Location. It just takes 10 seconds to set. It is easy.
 
If you are displaying the data in the query as it appears that you are then it would be better if you create a form to show the query results.
 
Problem solved you were right rural guy
Thanks for your help and thanks to everyone else
John
 
Excellent! Thanks for posting back with your success.
 

Users who are viewing this thread

Back
Top Bottom