Yeah PEB, i wished this would be the situation. Actually I can't persuade the user to have his database running with a nice fancy switchboard. The user is more down-to-earth. So no from no switchboard and the possibility that the user closes the database with the little cross in the upper right side of his screen :)
But I try the me.visible on Activate and if this does not help the user will have a little picture somewhere, which is...
User Profile
Collapse
-
Hm. It's not working. The only code I have in the form is the following:
Private Sub Form_Open(Cance l As Integer)
Me.Visible = False
End Sub
Private Sub Form_Unload(Can cel As Integer)
DoCmd.RunMacro "mcr_001_Run_Ma ke_Table_Querie s"
End Sub
Still the form is visible when I open the database. Any suggestion?...Leave a comment:
-
Can you give me maybe the full code? I'm not really that professional with VBA. Just started...
:)...Leave a comment:
-
I don't have a comand like "hide" in my libraries. Do I need somethig special. My code is now:
Private Sub Form_Load()
Forms("frm_not_ close").hide
End Sub
And not working......Leave a comment:
-
Forget my last post. IT IS WORKING :) :) :)
The only thing is I can't get the form invisible there is no such a property. I will try with a new form...Maybe that helps!
But thanks for your great help!
Ciao...Leave a comment:
-
Hi Andrew,
that's really a good indirect way :) I have just one question. User can close the database pressing the little x-button on the screen. They actually always do it, if the database doesn't have a form exiting the application. Are you sure that hitting this little x will run the unload event in the hidden form? I ask because I tried something like that already and it didn't seem to workmout. But maybe I missed something and made it...Leave a comment:
-
Run Queries on Close of DB without Form ???!!!
Hi,
I want to have some queries run on close of my database like the function "Repair on Close" But I don't want to use a form with VBA code or command buttons doing it. Is there any other possibility ??!!
Thanks in advance for answers :) -
-
This is the temp query sql from a couple of days ago.
SELECT [tbl_004_Agent Numbers].Name,
[tbl_004_Agent Numbers].[Staff No], [qry_003_Subquer y_Select_Staff_ Details].Title, [qry_002_Subquer y_Select_Dpeart ment_Details].[Dept Name], [qry_003_Subquer y_Select_Staff_ Details].[Employment Status New], [tbl_004_Agent Numbers].AFSL,
[tbl_004_Agent Numbers].[Individual ID],
[tbl_004_Agent Numbers].[CAPS ID],
...Leave a comment:
-
You probably need to know the Multiselect function I have for sFilter to understand Why the VBA was in that way I had.
Public Function MultiSelectSQL( ctl As Control, Optional Delimiter As String) As String
Dim sResult As String, vItem As Variant
With ctl
Select Case .ItemsSelected. Count
Case 0: sResult = " Is Null "
Case 1: sResult = " = '" & Delimiter & .ItemData(.Item sSelected(0))...Leave a comment:
-
The code you gave me I firstly had, but it was not working with the result. That's why I have no "=".
Now entering the one again the following error pops up:
Syntax Error (missing operator) in query expression '((T4.[Staff No] > 100) And (Q2.[Dept Name]=' = 'Spec Dist - NSW North") AND (Q3.[Employment Status]=' = ' Current"))'.
Due to my previous experience it happens becauseof the "="...Leave a comment:
-
Hi
I thought I delete the query very in the beginning with:
' Delete Temp Query
DoCmd.DeleteObj ect acQuery, "qry_011_Select _Agent_Numbers_ National"
And the query is working as expected at the moment. I also don't have a problem with my query, but with the user-group permission to run the query through a form. Running the query while selecting the single query without the form the permission...Leave a comment:
-
Private Sub Open1_Click()
On Error GoTo Err_macro1_Clic k
Dim db As DAO.Database
Dim strSQL As String
Dim qdf As DAO.QueryDef
Dim sFilter As String
Dim SFilter2 As String
Set db = CurrentDb()
sFilter = MultiSelectSQL( cboDept)
sFilter2 = MultiSelectSQL( cboStat)
' Close Temp Query
...Leave a comment:
-
I'm not sure, if I get your point. But I gave the group (not the single user, sorry I forgot to say) access to the tables underlying the specific query as well. The group has now read, read design, modify and update access to all data what is linked to the query in any way. It didn't work out......Leave a comment:
-
Problem with MSysTable object permission
Hi,
who can tell me what this error message means and what I have to do to solve the issue?
"You do not have the necessary permission to use the 'MSysTables' object. Have your system administrator or the person who created this object establish the appropriate permissions for you."
I'm the administrator and this happens with on of the users logon. I gave this user 'Read', 'Read Design' and 'Modify Design'... -
:o
No I did not! Sorry.
It's working now. I needed to add Tpe 6 as well because there were linked tables.
Thanks very much for you help! :)...Leave a comment:
-
I did like you said. But it is given me an error message saying "data type mismatch in criteria expression". Also I can't exit the error message any more, need to end task via task manager.
Are you sure it works?...Leave a comment:
-
List Box with all tables, queries and forms of my database
Hi,
is there any VBA code I can try to get all tables, queries and forms of my database selected and displayed in a list box of a form? And also the list box must be always held the current vlaues. Meaning if I enter a new table or form, the list box needs to show it.
Any help is much appreciated. :)
Thanks -
User- and Workgroup Permission Problem
Hi,
I have a really weird issue with the security of my database.
I set up a workgroup and some usergroups and users. I have a an admin usergroup, a read-only usergroup and a project-manager usergroup. In each usergroup I have several user.
No I give the user in the project-manager usergroup a different permission to tables and queries than an user in the read-only usergroup.
What happens now is very strange and if I would... -
Sorry I was too fast with the submit button. Here again the code a bit smaller:
Private Sub Open1_Click()
On Error GoTo Err_macro1_Clic k
Dim db As DAO.Database
Dim strSQL As String
Dim qdf As DAO.QueryDef
Set db = CurrentDb()
DoCmd.Close acQuery, "MyQry"
DoCmd.DeleteObj ect acQuery, "MyQry"...Leave a comment:
No activity results to display
Show More
Leave a comment: